We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b98330e commit 92d81f9Copy full SHA for 92d81f9
.vitepress/config/index.ts
@@ -18,7 +18,7 @@ export default defineConfig({
18
const head: HeadConfig[] = [ ...context.head ];
19
if (!context.pageData.isNotFound) {
20
const localesRegex = new RegExp(`^/(${Object.keys(locales).join('|')})`);
21
- const canonical = '/' + context.page.replace(/(index)?\.md$/, '');
+ const canonical = '/' + context.page.replace(/\.md$/, '.html').replace(/\/index\.html$/, '/');
22
23
for (const locale of Object.keys(locales)) {
24
const localePath = canonical.replace(localesRegex, `/${locale}`);
0 commit comments