fix(404): noindex instead of canonical

This commit is contained in:
electron-rare
2026-06-10 22:17:39 +02:00
parent 61e3046c40
commit b9e41e7cce
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
---
import '../styles/global.css';
interface Props { title: string; description: string; light?: boolean; }
const { title, description, light = false } = Astro.props;
interface Props { title: string; description: string; light?: boolean; noindex?: boolean; }
const { title, description, light = false, noindex = false } = Astro.props;
const fullTitle = `${title} | Formations L'Electron Rare`;
---
<!DOCTYPE html>
@@ -12,7 +12,7 @@ const fullTitle = `${title} | Formations L'Electron Rare`;
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{fullTitle}</title>
<meta name="description" content={description} />
<link rel="canonical" href={Astro.url.href} />
{noindex ? <meta name="robots" content="noindex" /> : <link rel="canonical" href={Astro.url.href} />}
<meta property="og:type" content="website" />
<meta property="og:title" content={fullTitle} />
<meta property="og:description" content={description} />
+1 -1
View File
@@ -2,7 +2,7 @@
import Base from '../layouts/Base.astro';
import Nav from '../components/Nav.astro';
---
<Base title="Introuvable" description="Page introuvable">
<Base title="Introuvable" description="Page introuvable" noindex>
<Nav />
<main class="pt-40 px-6 text-center">
<p class="text-7xl font-semibold text-copper mb-4">404</p>