Feat: Add a 404 page so unknown URLs stop serving the homepage

Cloudflare Pages falls back to the homepage with a 200 when there's no
404.html, which Google treats as soft 404s. The generated 404.html is
noindex and shows a detective gif from vibegif.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 22:18:53 +00:00
co-authored by Claude Opus 5.5
parent 5a4ff08d11
commit d18ca38882
3 changed files with 28 additions and 3 deletions
+2 -1
View File
@@ -72,7 +72,7 @@ export const merch = `
</section>
`;
export const shellHead = ({ title, desc, image, url, type = "website" }) => `<!doctype html>
export const shellHead = ({ title, desc, image, url, type = "website", noindex = false }) => `<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@@ -85,6 +85,7 @@ export const shellHead = ({ title, desc, image, url, type = "website" }) => `<!d
${url ? `<meta property="og:url" content="${url}" />` : ""}
${image ? `<meta property="og:image" content="${image}" />` : ""}
<meta name="theme-color" content="#fcfcfa" />
${noindex ? `<meta name="robots" content="noindex" />` : ""}
${url ? `<link rel="canonical" href="${url}" />` : ""}
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="alternate" type="application/rss+xml" title="apophenia.news RSS" href="${SITE_URL}/rss.xml" />