From e40fafe8e16ddfcc347fdcdb17be61be357042a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sat, 28 Dec 2024 18:57:08 +0900 Subject: [PATCH] docs: fix canonical links (#19084) --- .vitepress/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 72cf9ad5..015963e6 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -449,7 +449,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 }],