-rw-r--r-- | cgit.c | 2 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | cgitrc | 2 | ||||
-rw-r--r-- | ui-shared.c | 5 |
4 files changed, 10 insertions, 0 deletions
@@ -26,4 +26,6 @@ void config_cb(const char *name, const char *value) else if (!strcmp(name, "css")) ctx.cfg.css = xstrdup(value); + else if (!strcmp(name, "favicon")) + ctx.cfg.favicon = xstrdup(value); else if (!strcmp(name, "footer")) ctx.cfg.footer = xstrdup(value); @@ -126,4 +126,5 @@ struct cgit_config { char *clone_prefix; char *css; + char *favicon; char *footer; char *index_header; @@ -108,4 +108,6 @@ #css=/cgit/cgit.css +## Link to favicon +#favicon=/favicon.ico ## Link to logo file diff --git a/ui-shared.c b/ui-shared.c index 8a00099..6f83d2a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -438,4 +438,9 @@ void cgit_print_docstart(struct cgit_context *ctx) html_attr(ctx->cfg.css); html("'/>\n"); + if (ctx->cfg.favicon) { + html("<link rel='shortcut icon' href='"); + html_attr(ctx->cfg.favicon); + html("'/>\n"); + } html("</head>\n"); html("<body>\n"); |