mirror of
https://git.zx2c4.com/cgit
synced 2025-08-03 09:34:43 +02:00
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>
This commit is contained in:
parent
c4fbb99cee
commit
b522a302c9
5 changed files with 12 additions and 0 deletions
4
cgit.c
4
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue