Skip to content

Commit

Permalink
[U] Sitemap hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
cvyl committed May 21, 2024
1 parent 56b8980 commit 9b3ec92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ export default defineConfig({
},
buildEnd: async ({ outDir }) => {
const sitemap = new SitemapStream({ hostname: 'https://hrt.info/' })
const pages = await createContentLoader('*.md').load()
const pages = await createContentLoader(["**/*.md"]).load();
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'))

sitemap.pipe(writeStream)
pages.forEach((page) => sitemap.write(
page.url
.replace(/index.html$/g, '')
.replace(/index$/g, '')
.replace(/^\/docs/, '')
))
sitemap.end()
Expand Down

0 comments on commit 9b3ec92

Please sign in to comment.