config.js 2.0 KB

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