author | Lars Hjemli <hjemli@gmail.com> | 2009-02-01 18:17:52 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-02-01 18:17:52 (UTC) |
commit | 0b3c746ba80738dbe0885a21406409390936537c (patch) (side-by-side diff) | |
tree | 405a9f959feafab650f53e17561a1d3a85cb8097 | |
parent | d6174b7aab476c2b6a86e59d98cf978d603045f4 (diff) | |
parent | b115955d71c50cd2d0065c45f3df6b02fa4730bd (diff) | |
download | cgit-0b3c746ba80738dbe0885a21406409390936537c.zip cgit-0b3c746ba80738dbe0885a21406409390936537c.tar.gz cgit-0b3c746ba80738dbe0885a21406409390936537c.tar.bz2 |
Merge branch 'lh/header'
-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
@@ -30,8 +30,10 @@ void config_cb(const char *name, const char *value) else if (!strcmp(name, "favicon")) ctx.cfg.favicon = xstrdup(value); else if (!strcmp(name, "footer")) ctx.cfg.footer = xstrdup(value); + else if (!strcmp(name, "header")) + ctx.cfg.header = xstrdup(value); else if (!strcmp(name, "logo")) ctx.cfg.logo = xstrdup(value); else if (!strcmp(name, "index-header")) ctx.cfg.index_header = xstrdup(value); @@ -134,8 +134,9 @@ struct cgit_config { char *clone_prefix; char *css; char *favicon; char *footer; + char *header; char *index_header; char *index_info; char *logo; char *logo_link; diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 09f56a6..fd299ae 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -83,8 +83,12 @@ footer The content of the file specified with this option will be included verbatim at the bottom of all pages (i.e. it replaces the standard "generated by..." message. Default value: none. +header + The content of the file specified with this option will be included + verbatim at the top of all pages. Default value: none. + include Name of a configfile to include before the rest of the current config- file is parsed. Default value: none. diff --git a/ui-shared.c b/ui-shared.c index 4f28512..de77bbf 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -499,8 +499,10 @@ void cgit_print_docstart(struct cgit_context *ctx) html("' type='application/atom+xml'/>"); } html("</head>\n"); html("<body>\n"); + if (ctx->cfg.header) + html_include(ctx->cfg.header); } void cgit_print_docend() { |