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>
Jason A. Donenfeld Jason@zx2c4.com
Mon, 12 Feb 2018 23:10:06 +0100
5 files changed,
12 insertions(+),
0 deletions(-)
M
cgit.c
→
cgit.c
@@ -46,6 +46,8 @@ else if (!strcmp(name, "homepage"))
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 @@ fprintf(f, "repo.readme=%s\n", item->string);
} 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)
M
cgitrc.5.txt
→
cgitrc.5.txt
@@ -509,6 +509,10 @@ repo.enable-subject-links::
A flag which can be used to override the global setting `enable-subject-links'. Default value: none. +repo.extra-head-content:: + This value will be added verbatim to the head section of each page + displayed for this repo. Default value: none. + repo.hide:: Flag which, when set to "1", hides the repository from the repository index. The repository can still be accessed by providing a direct path.