diff options
author | Jason A. Donenfeld | 2018-02-12 23:10:06 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2018-07-03 20:37:00 +0200 |
commit | b522a302c9c4fb9fd9e1ea829ee990afc74980ca (patch) | |
tree | b1815354f08c1a16fb9d9c6d15dbe51bc3accbfd /cgit.c | |
parent | c4fbb99cee30fa295e240b429b2dc7e8ad83d535 (diff) | |
download | cgit-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -46,6 +46,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va | |||
46 | repo->homepage = xstrdup(value); | 46 | repo->homepage = xstrdup(value); |
47 | else if (!strcmp(name, "defbranch")) | 47 | else if (!strcmp(name, "defbranch")) |
48 | repo->defbranch = xstrdup(value); | 48 | repo->defbranch = xstrdup(value); |
49 | else if (!strcmp(name, "extra-head-content")) | ||
50 | repo->extra_head_content = xstrdup(value); | ||
49 | else if (!strcmp(name, "snapshots")) | 51 | else if (!strcmp(name, "snapshots")) |
50 | repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); | 52 | repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); |
51 | else if (!strcmp(name, "enable-commit-graph")) | 53 | else if (!strcmp(name, "enable-commit-graph")) |
@@ -797,6 +799,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo) | |||
797 | } | 799 | } |
798 | if (repo->defbranch) | 800 | if (repo->defbranch) |
799 | fprintf(f, "repo.defbranch=%s\n", repo->defbranch); | 801 | fprintf(f, "repo.defbranch=%s\n", repo->defbranch); |
802 | if (repo->extra_head_content) | ||
803 | fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content); | ||
800 | if (repo->module_link) | 804 | if (repo->module_link) |
801 | fprintf(f, "repo.module-link=%s\n", repo->module_link); | 805 | fprintf(f, "repo.module-link=%s\n", repo->module_link); |
802 | if (repo->section) | 806 | if (repo->section) |