From b522a302c9c4fb9fd9e1ea829ee990afc74980ca Mon Sep 17 00:00:00 2001 From: Jason A. Donenfeld Date: Mon, 12 Feb 2018 23:10:06 +0100 Subject: 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 --- cgit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cgit.c') 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) -- cgit v1.2.3-70-g09d2