feat: add canonical URL to the base layout

This commit is contained in:
Oliver Davies 2023-05-18 07:23:56 +01:00
parent f0eeaad7ea
commit 3796f23aa6

View file

@ -32,6 +32,8 @@ const footerLinks = [
href: "/search",
},
];
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
---
<!DOCTYPE html>
@ -46,6 +48,7 @@ const footerLinks = [
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,300&display=swap"
rel="stylesheet"
/>
<link rel="canonical" href={canonicalURL} />
<title>{title}</title>
<script
defer