summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c2
-rw-r--r--cgit.h1
-rw-r--r--ui-shared.c4
3 files changed, 6 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 64d95f9..2afc598 100644
--- a/cgit.c
+++ b/cgit.c
@@ -33,2 +33,4 @@ void config_cb(const char *name, const char *value)
ctx.cfg.footer = xstrdup(value);
+ else if (!strcmp(name, "head-include"))
+ ctx.cfg.head_include = xstrdup(value);
else if (!strcmp(name, "header"))
diff --git a/cgit.h b/cgit.h
index 5f7af51..aed826a 100644
--- a/cgit.h
+++ b/cgit.h
@@ -138,2 +138,3 @@ struct cgit_config {
char *footer;
+ char *head_include;
char *header;
diff --git a/ui-shared.c b/ui-shared.c
index de77bbf..fea2c40 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -498,4 +498,6 @@ void cgit_print_docstart(struct cgit_context *ctx)
fmt("h=%s", ctx->qry.head)));
- html("' type='application/atom+xml'/>");
+ html("' type='application/atom+xml'/>\n");
}
+ if (ctx->cfg.head_include)
+ html_include(ctx->cfg.head_include);
html("</head>\n");