Author: Mark Lodato <lodatom@gmail.com>
Add head-include configuration option. This patch adds an option to the configuration file, "head-include", which works just like "header" or "footer", except the content is put into the HTML's <head> tag.
cgit.c | 2 ++ cgit.h | 1 + ui-shared.c | 4 +++-
diff --git a/cgit.c b/cgit.c index 64d95f9a3a7bb56197988e6730c4576173811db0..2afc5988afa1261b3adacfd4d8c307838766c1cb 100644 --- a/cgit.c +++ b/cgit.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, "head-include")) + ctx.cfg.head_include = xstrdup(value); else if (!strcmp(name, "header")) ctx.cfg.header = xstrdup(value); else if (!strcmp(name, "logo")) diff --git a/cgit.h b/cgit.h index 5f7af51a68e0a773cac9c2758df51d5f0af90ff6..aed826afe589484ac60b7184460741c899eecbf7 100644 --- a/cgit.h +++ b/cgit.h @@ -136,6 +136,7 @@ char *clone_prefix; char *css; char *favicon; char *footer; + char *head_include; char *header; char *index_header; char *index_info; diff --git a/ui-shared.c b/ui-shared.c index de77bbfadf86dd08e794145395ca1e20e1f63e9c..fea2c4054c736b53bf97f7dc735016e94663f0c4 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -496,8 +496,10 @@ html("