neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 0b3c746ba80738dbe0885a21406409390936537c
parent d6174b7aab476c2b6a86e59d98cf978d603045f4
Author: Lars Hjemli <hjemli@gmail.com>
Date:   Sun,  1 Feb 2009 19:17:52 +0100

Merge branch 'lh/header'

Diffstat:
Mcgit.c | 2++
Mcgit.h | 1+
Mcgitrc.5.txt | 4++++
Mui-shared.c | 2++
4 files changed, 9 insertions(+), 0 deletions(-)

diff --git 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 @@ -135,6 +135,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 @@ -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 @@ -500,6 +500,8 @@ void cgit_print_docstart(struct cgit_context *ctx) } html("</head>\n"); html("<body>\n"); + if (ctx->cfg.header) + html_include(ctx->cfg.header); } void cgit_print_docend()