-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
@@ -32,4 +32,6 @@ void config_cb(const char *name, const char *value) | |||
32 | else if (!strcmp(name, "footer")) | 32 | else if (!strcmp(name, "footer")) |
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")) |
35 | ctx.cfg.logo = xstrdup(value); | 37 | ctx.cfg.logo = xstrdup(value); |
@@ -136,4 +136,5 @@ struct cgit_config { | |||
136 | char *favicon; | 136 | char *favicon; |
137 | char *footer; | 137 | char *footer; |
138 | char *header; | ||
138 | char *index_header; | 139 | char *index_header; |
139 | char *index_info; | 140 | char *index_info; |
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 09f56a6..fd299ae 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt | |||
@@ -85,4 +85,8 @@ footer | |||
85 | "generated by..." message. Default value: none. | 85 | "generated by..." message. Default value: none. |
86 | 86 | ||
87 | header | ||
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 | |||
87 | include | 91 | include |
88 | Name of a configfile to include before the rest of the current config- | 92 | Name of a configfile to include before the rest of the current config- |
diff --git a/ui-shared.c b/ui-shared.c index 4f28512..de77bbf 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -501,4 +501,6 @@ void cgit_print_docstart(struct cgit_context *ctx) | |||
501 | html("</head>\n"); | 501 | html("</head>\n"); |
502 | html("<body>\n"); | 502 | html("<body>\n"); |
503 | if (ctx->cfg.header) | ||
504 | html_include(ctx->cfg.header); | ||
503 | } | 505 | } |
504 | 506 | ||