1import { viteBundler } from '@vuepress/bundler-vite' 2import { defaultTheme } from '@vuepress/theme-default' 3import { defineUserConfig } from 'vuepress' 4 5export default defineUserConfig({ 6 title: 'DADK文档', 7 description: 'DragonOS Application Development Kit', 8 bundler: viteBundler(), 9 base: process.env.NODE_ENV === 'production' ? '/p/dadk/' : '/', 10 theme: defaultTheme( 11 { 12 repo: 'DragonOS-Community/DADK', 13 repoLabel: 'GitHub', 14 editLinks: true, 15 // 默认为 "Edit this page" 16 editLinkText: '帮助我们改善此页面!', 17 smoothScroll: true, 18 docsBranch: 'main', 19 nextLinks: true, 20 logo: 'https://static.dragonos.org.cn/casdoor/dragonos_en_pic.png', 21 docsDir: 'docs', 22 navbar: [ 23 { 24 text: '首页', 25 link: '/', 26 }, 27 { 28 text: '用户指南', 29 link: '/user-manual/', 30 }, 31 { 32 text: '开发者指南', 33 link: '/dev-guide/', 34 }, 35 ], 36 sidebar: { 37 '/': 'heading', 38 '/dev-guide/': [ 39 { 40 text: '开发者指南', 41 children: [ 42 '/dev-guide/README.md', 43 '/dev-guide/how-to-write-docs.md', 44 ], 45 }, 46 ], 47 '/user-manual/': [ 48 { 49 text: '用户指南', 50 children: [ 51 '/user-manual/README.md', 52 53 ] 54 } 55 ] 56 } 57 58 } 59 ), 60}) 61