aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-12 23:10:06 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-03 20:37:00 +0200
commitb522a302c9c4fb9fd9e1ea829ee990afc74980ca (patch)
treeb1815354f08c1a16fb9d9c6d15dbe51bc3accbfd /cgit.c
parentc4fbb99cee30fa295e240b429b2dc7e8ad83d535 (diff)
downloadcgit-b522a302c9c4fb9fd9e1ea829ee990afc74980ca.tar.gz
cgit-b522a302c9c4fb9fd9e1ea829ee990afc74980ca.tar.bz2
cgit-b522a302c9c4fb9fd9e1ea829ee990afc74980ca.zip
extra-head-content: introduce another option for meta tags
This is to support things like go-import meta tags, which are on a per-repo basis. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 0c9f3e9..e2d7891 100644
--- a/cgit.c
+++ b/cgit.c
@@ -46,6 +46,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
repo->homepage = xstrdup(value);
else if (!strcmp(name, "defbranch"))
repo->defbranch = xstrdup(value);
+ else if (!strcmp(name, "extra-head-content"))
+ repo->extra_head_content = xstrdup(value);
else if (!strcmp(name, "snapshots"))
repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value);
else if (!strcmp(name, "enable-commit-graph"))
@@ -797,6 +799,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
}
if (repo->defbranch)
fprintf(f, "repo.defbranch=%s\n", repo->defbranch);
+ if (repo->extra_head_content)
+ fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content);
if (repo->module_link)
fprintf(f, "repo.module-link=%s\n", repo->module_link);
if (repo->section)