summaryrefslogtreecommitdiffabout
Unidiff
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
@@ -28,12 +28,14 @@ void config_cb(const char *name, const char *value)
28 else if (!strcmp(name, "css")) 28 else if (!strcmp(name, "css"))
29 ctx.cfg.css = xstrdup(value); 29 ctx.cfg.css = xstrdup(value);
30 else if (!strcmp(name, "favicon")) 30 else if (!strcmp(name, "favicon"))
31 ctx.cfg.favicon = xstrdup(value); 31 ctx.cfg.favicon = xstrdup(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);
36 else if (!strcmp(name, "index-header")) 38 else if (!strcmp(name, "index-header"))
37 ctx.cfg.index_header = xstrdup(value); 39 ctx.cfg.index_header = xstrdup(value);
38 else if (!strcmp(name, "index-info")) 40 else if (!strcmp(name, "index-info"))
39 ctx.cfg.index_info = xstrdup(value); 41 ctx.cfg.index_info = xstrdup(value);
diff --git a/cgit.h b/cgit.h
index 4fe94c6..4942b96 100644
--- a/cgit.h
+++ b/cgit.h
@@ -132,12 +132,13 @@ struct cgit_config {
132 char *agefile; 132 char *agefile;
133 char *cache_root; 133 char *cache_root;
134 char *clone_prefix; 134 char *clone_prefix;
135 char *css; 135 char *css;
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;
140 char *logo; 141 char *logo;
141 char *logo_link; 142 char *logo_link;
142 char *module_link; 143 char *module_link;
143 char *repo_group; 144 char *repo_group;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 09f56a6..fd299ae 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -81,12 +81,16 @@ favicon
81 81
82footer 82footer
83 The content of the file specified with this option will be included 83 The content of the file specified with this option will be included
84 verbatim at the bottom of all pages (i.e. it replaces the standard 84 verbatim at the bottom of all pages (i.e. it replaces the standard
85 "generated by..." message. Default value: none. 85 "generated by..." message. Default value: none.
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
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-
89 file is parsed. Default value: none. 93 file is parsed. Default value: none.
90 94
91index-header 95index-header
92 The content of the file specified with this option will be included 96 The content of the file specified with this option will be included
diff --git a/ui-shared.c b/ui-shared.c
index 4f28512..de77bbf 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -497,12 +497,14 @@ void cgit_print_docstart(struct cgit_context *ctx)
497 html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path, 497 html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path,
498 fmt("h=%s", ctx->qry.head))); 498 fmt("h=%s", ctx->qry.head)));
499 html("' type='application/atom+xml'/>"); 499 html("' type='application/atom+xml'/>");
500 } 500 }
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
505void cgit_print_docend() 507void cgit_print_docend()
506{ 508{
507 html("</div>"); 509 html("</div>");
508 if (ctx.cfg.footer) 510 if (ctx.cfg.footer)