feat: Initialize VitePress configuration and add Node.js types dependency.

This commit is contained in:
dyzulk
2026-01-19 16:28:50 +07:00
parent 4876a89594
commit 2ba0d48919
3 changed files with 28 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
import { defineConfig } from 'vitepress'
import { createWriteStream } from 'fs'
import { resolve } from 'path'
import { sidebarEn, sidebarId } from './config/sidebars'
import { navEn, navId } from './config/nav'
@@ -11,6 +13,13 @@ export default defineConfig({
sitemap: {
hostname: 'https://mivodev.github.io'
},
buildEnd: ({ outDir }) => {
const sitemap = createWriteStream(resolve(outDir, 'robots.txt'))
sitemap.write('User-agent: *\n')
sitemap.write('Allow: /\n')
sitemap.write('Sitemap: https://mivodev.github.io/sitemap.xml\n')
sitemap.end()
},
head: [
['link', { rel: 'icon', href: '/logo-m.svg' }],