From 2bd8cb5aa296f92d3fd671072f7b7e295ab1aa24 Mon Sep 17 00:00:00 2001 From: Kurt Jacobson Date: Fri, 17 Jul 2026 12:26:52 -0400 Subject: [PATCH] Fix custom-logo favicon: update every , not just the first index.html ships two icon links (svg + sizes=32x32) and browsers often prefer the sized one, so rewriting only the first link never visibly changed the tab icon. --- web/src/hooks/use-site-config.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/src/hooks/use-site-config.tsx b/web/src/hooks/use-site-config.tsx index 091a98b..4611887 100644 --- a/web/src/hooks/use-site-config.tsx +++ b/web/src/hooks/use-site-config.tsx @@ -42,10 +42,15 @@ export function SiteConfigProvider({ children }: { children: ReactNode }) { attribution_url: data.attribution_url || "https://keygate.app", loading: false, }) - // Dynamic favicon from custom logo + // Dynamic favicon from custom logo. index.html declares + // multiple variants and browsers pick their + // favorite (often the sizes="32x32" one), so rewriting only + // the first link never visibly changed the tab icon — update + // them all. if (data.logo_url) { - const link = document.querySelector("link[rel='icon']") as HTMLLinkElement - if (link) link.href = data.logo_url + document.querySelectorAll("link[rel~='icon']").forEach((link) => { + link.href = data.logo_url + }) } if (data.brand_color) { document.documentElement.style.setProperty("--color-primary", data.brand_color)