fix: Always strip trailing slash on canonical links
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -56,7 +56,7 @@ const renderApp = async (
|
||||
const {
|
||||
title = "Outline",
|
||||
description = "A modern team knowledge base for your internal documentation, product specs, support answers, meeting notes, onboarding, & more…",
|
||||
canonical = ctx.request.href,
|
||||
canonical = "",
|
||||
} = options;
|
||||
|
||||
if (ctx.request.path === "/realtime/") {
|
||||
|
||||
Reference in New Issue
Block a user