all repos — cgit @ b115955d71c50cd2d0065c45f3df6b02fa4730bd

a hyperfast web frontend for git written in c

Add support for a custom header

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 29 Jan 2009 21:27:39 +0100
commit

b115955d71c50cd2d0065c45f3df6b02fa4730bd

parent

a61871a18ffa9fc28e7ab0950415404350c8c857

4 files changed, 9 insertions(+), 0 deletions(-)

jump to
M cgit.ccgit.c

@@ -31,6 +31,8 @@ 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"))
M cgit.hcgit.h

@@ -135,6 +135,7 @@ char *clone_prefix;

char *css; char *favicon; char *footer; + char *header; char *index_header; char *index_info; char *logo;
M cgitrc.5.txtcgitrc.5.txt

@@ -84,6 +84,10 @@ 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.
M ui-shared.cui-shared.c

@@ -500,6 +500,8 @@ html("' type='application/atom+xml'/>");

} html("</head>\n"); html("<body>\n"); + if (ctx->cfg.header) + html_include(ctx->cfg.header); } void cgit_print_docend()