mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 21:41:53 +07:00
feat: Initialize VitePress configuration and add Node.js types dependency.
This commit is contained in:
@@ -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' }],
|
||||
|
||||
Reference in New Issue
Block a user