aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgit.c
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2018-07-03 11:33:59 +0800
committerChristian Hesse <mail@eworm.de>2021-03-14 23:18:22 +0100
commit21c36836b16c225d335aa562fd42c74bbd8b4f8a (patch)
tree7d1599e7c511dd4ec88e30b1b5e746ed771a73b3 /cgit.c
parentbd6f5683f6cde4212364354b3139c1d521f40f39 (diff)
downloadcgit-21c36836b16c225d335aa562fd42c74bbd8b4f8a.tar.gz
cgit-21c36836b16c225d335aa562fd42c74bbd8b4f8a.tar.zst
cgit-21c36836b16c225d335aa562fd42c74bbd8b4f8a.zip
css: change to be a list
Without changing the default behaviour of including /cgit.css if nothing declared, allow the "css" config to be given multiple times listing one or more alternative URL paths to be included in the document head area. Signed-off-by: Andy Green <andy@warmcat.com> Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 08d81a1..94652f4 100644
--- a/cgit.c
+++ b/cgit.c
@@ -142,7 +142,7 @@ static void config_cb(const char *name, const char *value)
else if (!strcmp(name, "root-readme"))
ctx.cfg.root_readme = xstrdup(value);
else if (!strcmp(name, "css"))
- ctx.cfg.css = xstrdup(value);
+ string_list_append(&ctx.cfg.css, xstrdup(value));
else if (!strcmp(name, "favicon"))
ctx.cfg.favicon = xstrdup(value);
else if (!strcmp(name, "footer"))
@@ -376,7 +376,6 @@ static void prepare_context(void)
ctx.cfg.case_sensitive_sort = 1;
ctx.cfg.branch_sort = 0;
ctx.cfg.commit_sort = 0;
- ctx.cfg.css = "/cgit.css";
ctx.cfg.logo = "/cgit.png";
ctx.cfg.favicon = "/favicon.ico";
ctx.cfg.local_time = 0;