diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 596e0a3..2534c61 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -129,10 +129,18 @@ const THEME_JS = ` }); ` +// On-brand favicon: dark tile, white "R", accent-pink underscore (the logo mark). +const FAVICON = ` + + R + +` + function layout(title: string, body: string) { return ` ${title} + @@ -241,6 +249,15 @@ export default { async fetch(req: Request, env: { API_URL: string }) { const url = new URL(req.url) + if (url.pathname === '/favicon.svg' || url.pathname === '/favicon.ico') { + return new Response(FAVICON, { + headers: { + 'Content-Type': 'image/svg+xml', + 'Cache-Control': 'public, max-age=86400', + }, + }) + } + if (url.pathname === '/') { // Accept a query on the root too (e.g. /?q=what) — redirect to the // canonical results URL so the search actually runs.