fix(404): noindex instead of canonical
This commit is contained in:
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user