Skip to content

Commit eee9d6e

Browse files
committed
Fix canonical URL ending with "/"
1 parent 2b501f1 commit eee9d6e

File tree

1 file changed

+1
-1
lines changed
  • packages/gitbook/src/app/(site)/(content)/[[...pathname]]

1 file changed

+1
-1
lines changed

packages/gitbook/src/app/(site)/(content)/[[...pathname]]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export async function generateMetadata(props: PageProps): Promise<Metadata> {
165165
title: getTitle(data),
166166
description: page.description ?? '',
167167
alternates: {
168-
canonical: absoluteHref(getPagePath(pages, page), true),
168+
canonical: absoluteHref(getPagePath(pages, page), true).replace(/\/+$/g, ''),
169169
},
170170
openGraph: {
171171
images: [

0 commit comments

Comments
 (0)