From 536956f0f320d1cf4be0938d7836a1dee64b345a Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 4 Sep 2024 21:23:21 +0000 Subject: Added canonical URL --- src/components/CanonicalURL.astro | 5 +++++ src/layouts/BaseLayout.astro | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/components/CanonicalURL.astro (limited to 'src') diff --git a/src/components/CanonicalURL.astro b/src/components/CanonicalURL.astro new file mode 100644 index 0000000..0081f71 --- /dev/null +++ b/src/components/CanonicalURL.astro @@ -0,0 +1,5 @@ +--- +const canonicalURL = new URL(Astro.url.pathname, Astro.site); +--- + + diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index c100dad..2def353 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,5 +1,5 @@ --- - +import CanonicalURL from "../components/CanonicalURL.astro"; --- @@ -18,7 +18,7 @@ - + -- cgit v1.2.3