fix(sitemap): remove legacy yet outdated third-party sitemap generation utility components at build end & switchi to officially supported sitemap generation config of native vitepress with the correct notebook site hostname

This commit is contained in:
Anda Toshiki 2024-09-14 03:39:47 -07:00
parent 25805d6718
commit 283b3753c1
Signed by: andatoshiki
GPG Key ID: 443A8FB634CF898D

View File

@ -6,7 +6,7 @@ import { head } from './config/head'
import { themeConfig } from './config/theme'
import { withTwoslash } from '@andatoshiki/vitepress-plugin-shiki-twoslash'
import { generateSitemap as sitemap } from 'sitemap-ts'
// import { generateSitemap as sitemap } from 'sitemap-ts'
import { genFeed } from './plugins/genFeed'
import { createWriteStream } from 'node:fs'
import { resolve } from 'node:path'
@ -47,9 +47,12 @@ export default withTwoslash(
},
ignoreDeadLinks: true,
async buildEnd(siteConfig) {
await sitemap({ hostname: 'https://chodocs.cn/' })
// await sitemap({ hostname: 'https://note.toshiki.dev/' })
await genFeed(siteConfig)
},
sitemap: {
hostname: 'https://note.toshiki.dev'
}
})
)
customElements // custom element tags of markdown-it-katex in vitepress