aboutsummaryrefslogtreecommitdiff
path: root/examples/docs/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docs/src/components')
-rw-r--r--examples/docs/src/components/HeadSEO.astro4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/docs/src/components/HeadSEO.astro b/examples/docs/src/components/HeadSEO.astro
index 5d1a2bcb5..43a19c52b 100644
--- a/examples/docs/src/components/HeadSEO.astro
+++ b/examples/docs/src/components/HeadSEO.astro
@@ -5,7 +5,9 @@ export interface Props {
site: any;
canonicalURL: URL | string;
}
-const { content = {}, canonicalURL } = Astro.props;
+
+const canonicalURL = new URL(Astro.url.pathname, Astro.site);
+const { content = {} } = Astro.props;
const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title;
const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src;
const canonicalImageSrc = new URL(imageSrc, Astro.site);