Skip to content

Commit 24aada3

Browse files
kiakingsapphi-red
andauthored
docs: fix canonical links (#19084) (#1794)
Co-authored-by: 翠 / green <[email protected]>
1 parent d33576c commit 24aada3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export default defineConfig({
449449
transformPageData(pageData) {
450450
const canonicalUrl = `${ogUrl}/${pageData.relativePath}`
451451
.replace(/\/index\.md$/, '/')
452-
.replace(/\.md$/, '/')
452+
.replace(/\.md$/, '')
453453
pageData.frontmatter.head ??= []
454454
pageData.frontmatter.head.unshift(
455455
['link', { rel: 'canonical', href: canonicalUrl }],

0 commit comments

Comments
 (0)