From b9228bc339d69783bd0439c692eee08f99c206ba Mon Sep 17 00:00:00 2001 From: Vincent Wilson Date: Thu, 28 Mar 2024 14:02:28 -0400 Subject: [PATCH] Add canonical url (#200) --- packages/web-shared/components/ContentSingle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web-shared/components/ContentSingle.js b/packages/web-shared/components/ContentSingle.js index dfbb59ce..ef2196c1 100644 --- a/packages/web-shared/components/ContentSingle.js +++ b/packages/web-shared/components/ContentSingle.js @@ -190,12 +190,16 @@ function ContentSingle(props = {}) { } }; + // Try and convince Google that this is the canonical URL + const canonicalUrl = `${window.location.origin}?id=${searchParams.get('id')}`; + return ( <> {/* TODO: Max width set to 750px due to low resolution pictures. Can be increased as higher quality images are used */} {/* Standard metadata tags */} {title} + {/* End standard metadata tags */}