We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d97409 commit d989132Copy full SHA for d989132
docs/.vitepress/config.mjs
@@ -9,6 +9,16 @@ export default defineConfigWithTheme({
9
description: 'Examples of Vue patterns and basic components',
10
appearance: false,
11
12
+ transformHead({ page, siteData: { base } }) {
13
+ if (page !== '404.md') {
14
+ const canonicalUrl = `https://skirtles-code.github.io${base}${page}`
15
+ .replace(/index\.md$/, '')
16
+ .replace(/\.md$/, '')
17
+
18
+ return [['link', { rel: 'canonical', href: canonicalUrl }]]
19
+ }
20
+ },
21
22
themeConfig: {
23
search: {
24
provider: 'local'
0 commit comments