From: Lars Hjemli Date: Sun, 1 Feb 2009 18:29:47 +0000 (+0100) Subject: Merge branch 'lh/binary' X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/5e447b1ed1aa751e8ec93dccf4df6fa4a7ffddb6?hp=481ce5e298e2dcd7edc1d4a30e523dda2ce58b01 Merge branch 'lh/binary' --- diff --git a/cgit.c b/cgit.c index 608cab6..64d95f9 100644 --- a/cgit.c +++ b/cgit.c @@ -31,6 +31,8 @@ void config_cb(const char *name, const char *value) 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")) diff --git a/cgit.h b/cgit.h index 8b0defa..5f7af51 100644 --- a/cgit.h +++ b/cgit.h @@ -136,6 +136,7 @@ struct cgit_config { char *css; char *favicon; char *footer; + char *header; char *index_header; char *index_info; char *logo; diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 09f56a6..fd299ae 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -84,6 +84,10 @@ footer 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 @@ -500,6 +500,8 @@ void cgit_print_docstart(struct cgit_context *ctx) } html("\n"); html("\n"); + if (ctx->cfg.header) + html_include(ctx->cfg.header); } void cgit_print_docend()