From ecd00d26cd48edd23c90277361743225e73ebea7 Mon Sep 17 00:00:00 2001 From: Josh Heyer Date: Mon, 18 Mar 2024 18:22:43 +0000 Subject: [PATCH] DOCS-223: ensure every page has a rel="canonical" header --- src/components/layout.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/layout.js b/src/components/layout.js index 52ab9c6798c..cc4966f8e69 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -27,6 +27,7 @@ const Layout = ({ const { baseUrl, imageUrl, title: siteTitle } = useSiteMetadata(); const meta = pageMeta || {}; const url = meta.path ? baseUrl + meta.path : baseUrl; + const canonicalUrl = meta.canonicalPath ? baseUrl + meta.canonicalPath : url; const title = meta.title ? `EDB Docs - ${meta.title}` : siteTitle; const [dark, setDark] = useState(false); @@ -122,9 +123,7 @@ const Layout = ({ )} - {meta.canonicalPath && ( - - )} +