Skip to content

Commit

Permalink
docs: fix canonical links (#19084)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Dec 28, 2024
1 parent b07c036 commit e1b520c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export default defineConfig({
transformPageData(pageData) {
const canonicalUrl = `${ogUrl}/${pageData.relativePath}`
.replace(/\/index\.md$/, '/')
.replace(/\.md$/, '/')
.replace(/\.md$/, '')
pageData.frontmatter.head ??= []
pageData.frontmatter.head.unshift(
['link', { rel: 'canonical', href: canonicalUrl }],
Expand Down

0 comments on commit e1b520c

Please sign in to comment.