config.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. const demoUrl = 'https://bhuh12.github.io/vue-router-tab/demo/'
  2. module.exports = {
  3. title: 'Vue Router Tab',
  4. description: '基于 Vue Router 的路由页签组件',
  5. head: [
  6. ['link', { rel: 'icon', href: 'https://bhuh12.github.io/vue-router-tab/demo/img/logo.png' }]
  7. ],
  8. // 基础路径
  9. base: '/vue-router-tab/',
  10. // 输出目录
  11. dest: 'dist/docs',
  12. // 主题配置
  13. themeConfig: {
  14. // 页头导航
  15. nav: [
  16. { text: '教程', link: '/guide/' },
  17. { text: 'API', link: '/api/' },
  18. { text: 'Demo', link: demoUrl },
  19. { text: '更新日志', link: 'https://github.com/bhuh12/vue-router-tab/releases' },
  20. { text: '主页', link: 'https://bhuh.net' }
  21. ],
  22. // 侧边栏显示所有子集菜单 (默认显示活动)
  23. // displayAllHeaders: true,
  24. // 侧边栏
  25. sidebar: {
  26. '/guide/': [
  27. '',
  28. 'installation',
  29. {
  30. title: '基础',
  31. collapsable: false,
  32. children: [
  33. 'essentials/',
  34. 'essentials/operate',
  35. 'essentials/iframe',
  36. 'essentials/rule',
  37. 'essentials/i18n'
  38. ]
  39. },
  40. {
  41. title: '进阶',
  42. collapsable: false,
  43. children: [
  44. 'advanced/transition',
  45. 'advanced/slot',
  46. 'advanced/initial-tabs',
  47. 'advanced/dynamic-tab-info',
  48. 'advanced/page-leave'
  49. ]
  50. }
  51. ]
  52. }/* [
  53. '/guide/',
  54. '/guide/installation',
  55. {
  56. title: '基础',
  57. collapsable: false,
  58. children: [
  59. '/guide/essentials/',
  60. '/guide/essentials/operate',
  61. '/guide/essentials/rule',
  62. '/guide/essentials/i18n'
  63. ]
  64. },
  65. {
  66. title: '进阶',
  67. collapsable: false,
  68. children: [
  69. '/guide/advanced/',
  70. '/guide/advanced/transition',
  71. '/guide/advanced/slot',
  72. '/guide/advanced/initial-tabs',
  73. '/guide/advanced/dynamic-tab-info',
  74. '/guide/advanced/page-leave'
  75. ]
  76. }
  77. ] */,
  78. // Demo路径
  79. demoUrl: demoUrl,
  80. // 假定是 GitHub. 同时也可以是一个完整的 GitLab URL
  81. repo: 'bhuh12/vue-router-tab',
  82. repoLabel: 'GitHub',
  83. // 假如文档放在一个特定的分支下:
  84. docsBranch: 'dev',
  85. lastUpdated: '上次更新',
  86. },
  87. // markdow 配置
  88. markdown: {
  89. lineNumbers: true,
  90. },
  91. plugins: {
  92. '@vuepress/pwa': {
  93. serviceWorker: true,
  94. updatePopup: {
  95. message: '发现新内容可用',
  96. buttonText: '刷新'
  97. }
  98. },
  99. '@vuepress/back-to-top': true
  100. }
  101. }