-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
@@ -27,2 +27,4 @@ void config_cb(const char *name, const char *value) ctx.cfg.css = xstrdup(value); + else if (!strcmp(name, "favicon")) + ctx.cfg.favicon = xstrdup(value); else if (!strcmp(name, "footer")) @@ -127,2 +127,3 @@ struct cgit_config { char *css; + char *favicon; char *footer; @@ -109,2 +109,4 @@ +## Link to favicon +#favicon=/favicon.ico diff --git a/ui-shared.c b/ui-shared.c index 8a00099..6f83d2a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -439,2 +439,7 @@ void cgit_print_docstart(struct cgit_context *ctx) html("'/>\n"); + if (ctx->cfg.favicon) { + html("<link rel='shortcut icon' href='"); + html_attr(ctx->cfg.favicon); + html("'/>\n"); + } html("</head>\n"); |