From d6dae88345d24b8e468f63faad6a09173d2cbeac Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 23 Aug 2026 03:44:29 +0300 Subject: fix: serve a google-eligible favicon --- website/_headers | 9 +++++++++ website/assets/favicon.png | Bin 2196 -> 7872 bytes website/assets/favicon.svg | 6 ++++++ website/astro.config.mjs | 8 +++++++- website/favicon.ico | Bin 0 -> 15086 bytes website/index.html | 3 ++- website/scripts/prepare-docs.mjs | 1 + website/src/components/MarketingLayout.astro | 3 ++- website/src/components/SiteLayout.astro | 3 ++- 9 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 website/assets/favicon.svg create mode 100644 website/favicon.ico (limited to 'website') diff --git a/website/_headers b/website/_headers index 6422cca9..47081953 100644 --- a/website/_headers +++ b/website/_headers @@ -6,6 +6,15 @@ /assets/* Cache-Control: public, max-age=604800, immutable +# Icon URLs stay stable for Google's favicon crawler, so they can't be +# cache-busted with a query; keep them out of the immutable asset rule. +/assets/favicon.png + Cache-Control: public, max-age=86400 + +/favicon.ico + Content-Type: image/x-icon + Cache-Control: public, max-age=86400 + /install.sh Content-Type: text/plain Content-Disposition: inline diff --git a/website/assets/favicon.png b/website/assets/favicon.png index 79404044..a7720d48 100644 Binary files a/website/assets/favicon.png and b/website/assets/favicon.png differ diff --git a/website/assets/favicon.svg b/website/assets/favicon.svg new file mode 100644 index 00000000..8e3f8c42 --- /dev/null +++ b/website/assets/favicon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/website/astro.config.mjs b/website/astro.config.mjs index 8afbf46f..b216e6d8 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -71,7 +71,7 @@ export default defineConfig({ starlight({ title: 'herdr', description: 'Terminal-native agent runtime and multiplexer.', - favicon: '/assets/favicon.png?v=14', + favicon: '/favicon.ico', defaultLocale: 'root', locales: { root: { label: 'English', lang: 'en' }, @@ -110,6 +110,12 @@ export default defineConfig({ ], customCss: ['./src/styles/starlight.css'], head: [ + { + // Google's favicon crawler rejects icons smaller than 48px + tag: 'link', + attrs: { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/assets/favicon.png' }, + }, + { tag: 'link', attrs: { rel: 'apple-touch-icon', href: '/assets/logo.png' } }, // the brand display face; Starlight owns its own , so the // marketing pages' font link doesn't reach docs { tag: 'link', attrs: { rel: 'preconnect', href: 'https://fonts.googleapis.com' } }, diff --git a/website/favicon.ico b/website/favicon.ico new file mode 100644 index 00000000..fe1d81c0 Binary files /dev/null and b/website/favicon.ico differ diff --git a/website/index.html b/website/index.html index 4186792e..cf8dd79a 100644 --- a/website/index.html +++ b/website/index.html @@ -47,7 +47,8 @@ /> - + + - + +