fix: Always strip trailing slash on canonical links

This commit is contained in:
Tom Moor
2022-06-06 22:04:12 +02:00
parent e5b524e4c2
commit 14b9259a47
2 changed files with 5 additions and 2 deletions

View File

@@ -119,7 +119,10 @@ function SharedDocumentScene(props: Props) {
return (
<>
<Helmet>
<link rel="canonical" href={canonicalOrigin + location.pathname} />
<link
rel="canonical"
href={canonicalOrigin + location.pathname.replace(/\/$/, "")}
/>
</Helmet>
<Layout title={response.document.title} sidebar={sidebar}>
<Document