-rw-r--r-- | cgit.c | 2 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | cgitrc.5.txt | 4 | ||||
-rw-r--r-- | ui-shared.c | 2 |
4 files changed, 9 insertions, 0 deletions
@@ -33,2 +33,4 @@ void config_cb(const char *name, const char *value) ctx.cfg.footer = xstrdup(value); + else if (!strcmp(name, "header")) + ctx.cfg.header = xstrdup(value); else if (!strcmp(name, "logo")) @@ -137,2 +137,3 @@ struct cgit_config { char *footer; + char *header; 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 +header + The content of the file specified with this option will be included + verbatim at the top of all pages. Default value: none. + include 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) html("<body>\n"); + if (ctx->cfg.header) + html_include(ctx->cfg.header); } |