From ece5542bbe560370db73fec93b56c0f4a799beb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 20 Jul 2021 22:07:01 +0200 Subject: Add www/cgit/patch-index-header --- www/cgit/patch-index-header | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 www/cgit/patch-index-header (limited to 'www') diff --git a/www/cgit/patch-index-header b/www/cgit/patch-index-header new file mode 100644 index 0000000..83a5f93 --- /dev/null +++ b/www/cgit/patch-index-header @@ -0,0 +1,37 @@ +$NetBSD$ + +--- cgit.c.orig 2021-07-20 20:02:12.110866300 +0000 ++++ cgit.c +@@ -141,6 +141,8 @@ static void config_cb(const char *name, + ctx.cfg.root_desc = xstrdup(value); + else if (!strcmp(name, "root-readme")) + ctx.cfg.root_readme = xstrdup(value); ++ else if (!strcmp(name, "index-header")) ++ ctx.cfg.index_header = xstrdup(value); + else if (!strcmp(name, "css")) + ctx.cfg.css = xstrdup(value); + else if (!strcmp(name, "favicon")) + +--- cgit.h.orig 2020-03-13 23:49:52.000000000 +0000 ++++ cgit.h +@@ -200,6 +200,7 @@ struct cgit_config { + char *footer; + char *head_include; + char *header; ++ char *index_header; + char *logo; + char *logo_link; + char *mimetype_file; + +--- ui-repolist.c.orig 2020-03-13 23:49:52.000000000 +0000 ++++ ui-repolist.c +@@ -288,6 +288,9 @@ void cgit_print_repolist(void) + cgit_print_docstart(); + cgit_print_pageheader(); + ++ if (ctx.cfg.index_header) ++ html_include(ctx.cfg.index_header); ++ + if (ctx.qry.sort) + sorted = sort_repolist(ctx.qry.sort); + else if (ctx.cfg.section_sort) -- cgit v1.2.3