From 46757a6ce38a7073773af0cb77f687db571632f0 Mon Sep 17 00:00:00 2001 From: Shivam Date: Wed, 21 Dec 2022 23:47:40 +0530 Subject: [PATCH] Add canonical URL to blog example (#5651) --- examples/blog/src/components/BaseHead.astro | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/blog/src/components/BaseHead.astro b/examples/blog/src/components/BaseHead.astro index ce60a7e77..371f6bd85 100644 --- a/examples/blog/src/components/BaseHead.astro +++ b/examples/blog/src/components/BaseHead.astro @@ -9,6 +9,8 @@ export interface Props { image?: string; } +const canonicalURL = new URL(Astro.url.pathname, Astro.site); + const { title, description, image = '/placeholder-social.jpg' } = Astro.props; --- @@ -18,6 +20,9 @@ const { title, description, image = '/placeholder-social.jpg' } = Astro.props; + + + {title}