config: add js

Just like the config allows setting css URL path, add a config for
setting the js URL path

Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Andy Green 2018-06-23 18:25:53 +08:00 committed by Jason A. Donenfeld
parent 093ac96970
commit aee39b4e9a
6 changed files with 33 additions and 0 deletions

2
cgit.c
View file

@ -143,6 +143,8 @@ static void config_cb(const char *name, const char *value)
ctx.cfg.root_readme = xstrdup(value);
else if (!strcmp(name, "css"))
string_list_append(&ctx.cfg.css, xstrdup(value));
else if (!strcmp(name, "js"))
string_list_append(&ctx.cfg.js, xstrdup(value));
else if (!strcmp(name, "favicon"))
ctx.cfg.favicon = xstrdup(value);
else if (!strcmp(name, "footer"))