Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit ca2e7ca

Browse files
committed
docs: use sitemap option instead of manual
1 parent e9a45ea commit ca2e7ca

File tree

3 files changed

+7
-50
lines changed

3 files changed

+7
-50
lines changed

apps/docs/.vitepress/config.ts

+2-17
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,7 @@ export default defineConfig({
3535
},
3636
},
3737
appearance: false,
38-
transformHtml: (_, id, {pageData}) => {
39-
if (!/[\\/]404\.html$/.test(id))
40-
links.push({
41-
// you might need to change this if not using clean urls mode
42-
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
43-
lastmod: pageData.lastUpdated,
44-
})
45-
},
46-
buildEnd: async ({outDir}) => {
47-
const sitemap = new SitemapStream({
48-
hostname: `https://bootstrap-vue-next.github.io${baseUrl}`,
49-
})
50-
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'))
51-
sitemap.pipe(writeStream)
52-
links.forEach((link) => sitemap.write(link))
53-
sitemap.end()
54-
await new Promise((r) => writeStream.on('finish', r))
38+
sitemap: {
39+
hostname: `https://bootstrap-vue-next.github.io${baseUrl}`,
5540
},
5641
})

apps/docs/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"eslint-define-config": "^1.23.0",
2929
"eslint-plugin-vue": "^9.17.0",
3030
"prettier": "^3.0.3",
31-
"sitemap": "^7.1.1",
3231
"typescript": "^5.2.2",
3332
"unplugin-icons": "^0.17.0",
3433
"vitepress": "1.0.0-rc.10",

pnpm-lock.yaml

+5-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)