Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1ebff80

Browse filesBrowse files
committed
Fix canonical url generation
1 parent 06f9af6 commit 1ebff80
Copy full SHA for 1ebff80

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/.vitepress/config.ts

Copy file name to clipboardExpand all lines: src/.vitepress/config.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ export default async() => defineConfig({
7272
],
7373
transformHead(ctx) {
7474
return [
75-
['meta', { property: 'og:url', content: `${domain}/${ctx.pageData.relativePath.replace('.md', '').replace('index.html', '')}` }],
76-
['link', { rel: 'canonical', href: `${domain}/${ctx.pageData.relativePath.replace('.md', '').replace('index.html', '')}` }]
75+
['meta', { property: 'og:url', content: `${domain}/${ctx.pageData.relativePath.replace('index.md', '').replace('.md', '')}` }],
76+
['link', { rel: 'canonical', href: `${domain}/${ctx.pageData.relativePath.replace('index.md', '').replace('.md', '')}` }]
7777
]
7878
},
7979
sitemap: {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.