From 0ad4d0c00c7014fc6775553746b7f5bcbbf42790 Mon Sep 17 00:00:00 2001 From: Joe Kendall Date: Fri, 31 May 2024 15:26:09 -0400 Subject: [PATCH] adding canonical url to fix google indexing issue --- astro.config.mjs | 2 +- src/layouts/Layout.astro | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 999618b..c411484 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,6 +9,6 @@ export default defineConfig({ inlineStylesheets: 'always', assets: 'assets/docs/_astro' }, - + site: 'https://noop.dev', integrations: [tailwind(), mdx(), pagefind({site: 'dist', outputSubdir: 'assets/docs/pf'})] }) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 4ccea7f..992e980 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -10,6 +10,8 @@ export interface Props { title: string; } +const canonicalURL = new URL(Astro.url.pathname, Astro.site); + const { data = {} } = Astro.props --- @@ -22,7 +24,7 @@ const { data = {} } = Astro.props - +