config.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. const path = require("path");
  2. const { config, themeConfig } = require("vuepress-theme-hope");
  3. module.exports = config({
  4. title: "spug devOps 发布平台技术文档平台",
  5. theme: "vuepress-theme-hope",
  6. description: "spug devOps 发布平台与项目接入规范",
  7. markdown: {
  8. lineNumbers: true, // 代码块显示行号
  9. },
  10. smoothScroll: true,
  11. port: 5000,
  12. // base: '/ui/',
  13. evergreen: true,
  14. hostname: "http://test.com",
  15. head: [
  16. // react 需要 React, ReactDOM 和 Babel 库
  17. // vue 只需要 vue 库
  18. ["script", { src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js" }],
  19. ],
  20. // plugins: {
  21. // "@vuepress/medium-zoom": {
  22. // selector: ".theme-note-content img",
  23. // options: {
  24. // margin: 0,
  25. // background: "rgba(0,0,0,.4)"
  26. // }
  27. // },
  28. // "@vuepress/active-header-links": {
  29. // sidebarLinkSelector: ".sidebar-link",
  30. // headerAnchorSelector: ".header-anchor"
  31. // }
  32. // },
  33. themeConfig: {
  34. blog: false,
  35. smoothScroll: true,
  36. mdEnhance: {
  37. tasklist: true,
  38. flowchart: true,
  39. mermaid: true,
  40. demo: true,
  41. align: true,
  42. mark: true,
  43. },
  44. lastUpdated: "上次更新",
  45. // repo: "JackRay-c/vuepress-theme-note",
  46. docsBranch: "gh-pages",
  47. editLinkText: "帮助我们改善此页面!",
  48. displayAllHeaders: true,
  49. activeHeaderLinks: true,
  50. // algolia: {
  51. // apiKey: '005d7d949bd2c403ee056670a5c60044',
  52. // indexName: ''
  53. // },
  54. nav: [
  55. { text: "基础架构", link: "/base/" },
  56. // { text: "组件", link: "/component/" },
  57. // { text: "Event", link: "/event/" },
  58. // { text: "2D", link: "/2d/" },
  59. // { text: "3D", link: "/3d/" },
  60. // { text: "硬装部分", link: "/hardfix/" }
  61. ],
  62. sidebar: {
  63. // "/base/": [
  64. // {
  65. // title: "基础架构", // 必要的
  66. // collapsable: false, // 可选的, 默认值是 true,建议改为false
  67. // sidebarDepth: 1, // 可选的, 默认值是 1,建议改为0
  68. // children: ["", "develop"]
  69. // }
  70. // ],
  71. // "/component/": [
  72. // {
  73. // title: "components(组件)",
  74. // collapsable: false,
  75. // sidebarDepth: 1,
  76. // children: ["", "basic", "shared"]
  77. // }
  78. // ],
  79. // "/event/": [
  80. // {
  81. // title: "事件", // 必要的
  82. // collapsable: false, // 可选的, 默认值是 true,建议改为false
  83. // sidebarDepth: 0, // 可选的, 默认值是 1,建议改为0
  84. // children: ["inspect","boxstool", "switchView", "moveCanvas"]
  85. // }
  86. // ],
  87. // "/hardfix/": [
  88. // {
  89. // title: "目录", // 必要的
  90. // collapsable: false, // 可选的, 默认值是 true,建议改为false
  91. // sidebarDepth: 0, // 可选的, 默认值是 1,建议改为0
  92. // children: ["", "open"]
  93. // }
  94. // ]
  95. },
  96. },
  97. configureWebpack: {
  98. resolve: {
  99. alias: {
  100. "@": path.join(__dirname, "../../src/"),
  101. },
  102. },
  103. },
  104. });