Skip to content

Commit

Permalink
docs: fix canonical links
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Dec 27, 2024
1 parent f7b1964 commit 86f9be6
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 86f9be6

Please sign in to comment.