summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2009-01-29 20:27:39 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-01-29 20:27:39 (UTC)
commitb115955d71c50cd2d0065c45f3df6b02fa4730bd (patch) (unidiff)
tree074182f3e305b4982a97c482ed5fbcc5c6d270a7
parenta61871a18ffa9fc28e7ab0950415404350c8c857 (diff)
downloadcgit-b115955d71c50cd2d0065c45f3df6b02fa4730bd.zip
cgit-b115955d71c50cd2d0065c45f3df6b02fa4730bd.tar.gz
cgit-b115955d71c50cd2d0065c45f3df6b02fa4730bd.tar.bz2
Add support for a custom header
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c2
-rw-r--r--cgit.h1
-rw-r--r--cgitrc.5.txt4
-rw-r--r--ui-shared.c2
4 files changed, 9 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 608cab6..64d95f9 100644
--- a/cgit.c
+++ b/cgit.c
@@ -33,2 +33,4 @@ void config_cb(const char *name, const char *value)
33 ctx.cfg.footer = xstrdup(value); 33 ctx.cfg.footer = xstrdup(value);
34 else if (!strcmp(name, "header"))
35 ctx.cfg.header = xstrdup(value);
34 else if (!strcmp(name, "logo")) 36 else if (!strcmp(name, "logo"))
diff --git a/cgit.h b/cgit.h
index 4fe94c6..4942b96 100644
--- a/cgit.h
+++ b/cgit.h
@@ -137,2 +137,3 @@ struct cgit_config {
137 char *footer; 137 char *footer;
138 char *header;
138 char *index_header; 139 char *index_header;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 09f56a6..fd299ae 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -86,2 +86,6 @@ footer
86 86
87header
88 The content of the file specified with this option will be included
89 verbatim at the top of all pages. Default value: none.
90
87include 91include
diff --git a/ui-shared.c b/ui-shared.c
index 4f28512..de77bbf 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -502,2 +502,4 @@ void cgit_print_docstart(struct cgit_context *ctx)
502 html("<body>\n"); 502 html("<body>\n");
503 if (ctx->cfg.header)
504 html_include(ctx->cfg.header);
503} 505}