Skip to content

Commit

Permalink
docs: sitemap url config update
Browse files Browse the repository at this point in the history
Since clean url mode is not currently enabled, update the url in the sitemap to have the html suffix.

Signed-off-by: han <suyanhanx@gmail.com>
  • Loading branch information
suyanhanx committed Jan 4, 2023
1 parent 41b6738 commit 6699420
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs-zh/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default defineConfig({
transformHtml: (_, id, { pageData }) => {
if (!/[\\/]404\.html$/.test(id))
links.push({
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
url: pageData.relativePath.replace(/\.md$/, '.html'),
lastmod: pageData.lastUpdated
})
},
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default defineConfig({
transformHtml: (_, id, { pageData }) => {
if (!/[\\/]404\.html$/.test(id))
links.push({
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
url: pageData.relativePath.replace(/\.md$/, '.html'),
lastmod: pageData.lastUpdated
})
},
Expand Down

0 comments on commit 6699420

Please sign in to comment.