Website Summary Files Commits Branches @commit @diff @stats
path: root / ui-shared.c
diff options
context:
space:
mode:
Commit880351bd0ba746bbf276425341598afa905d552f (patch)
Author
 Syndamia <kamen@syndamia.com>
2026-10-02 07:26:43 +0300
Committer
 Syndamia <kamen@syndamia.com>
2026-10-04 12:00:00 +0300
Filescc710441deda826994763cbfe90522ca277b2d5e /ui-shared.c
cgit-880351bd0ba746bbf276425341598afa905d552f.tar
cgit-880351bd0ba746bbf276425341598afa905d552f.tar.gz
cgit-880351bd0ba746bbf276425341598afa905d552f.zip
Parent272ba15d592db92dec57a42dfeedb1d4a0d734bb (diff)
ui-shared: Use repo logo as favicon when available
1 files changed, 9 insertions, 0 deletions
-rw-r--r--ui-shared.c9
diff --git a/ui-shared.c b/ui-shared.c
index 35202ed..9ef7980 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -833,7 +833,16 @@ void cgit_print_docstart(void)
else
emit_js_link(NULL, "/cgit.js");
+#ifdef __CGIT_LOGO_FAVICON
+ if (ctx.repo && ctx.repo->logo && *ctx.repo->logo) {
+ html("<link rel='icon' href='");
+ html_attr(ctx.repo->logo);
+ html("' />\n");
+ }
+ else if (ctx.cfg.favicon && *ctx.cfg.favicon) {
+#else
if (ctx.cfg.favicon && *ctx.cfg.favicon) {
+#endif
html("<link rel='shortcut icon' href='");
html_attr(ctx.cfg.favicon);
html("'/>\n");