mirror of
https://github.com/apophenia-news/apophenia.news.git
synced 2026-10-29 14:54:54 +00:00
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:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user