config.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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: "/course" },
  56. { text: "分支规范", link: "/branch" },
  57. { text: "流程规范", link: "/flow" },
  58. { text: "技术支持", link: "/support" },
  59. // { text: "Event", link: "/event/" },
  60. // { text: "2D", link: "/2d/" },
  61. // { text: "3D", link: "/3d/" },
  62. // { text: "硬装部分", link: "/hardfix/" }
  63. ],
  64. sidebar: {
  65. // "/base/": [
  66. // {
  67. // title: "基础架构", // 必要的
  68. // collapsable: false, // 可选的, 默认值是 true,建议改为false
  69. // sidebarDepth: 1, // 可选的, 默认值是 1,建议改为0
  70. // children: ["", "develop"]
  71. // }
  72. // ],
  73. // "/component/": [
  74. // {
  75. // title: "components(组件)",
  76. // collapsable: false,
  77. // sidebarDepth: 1,
  78. // children: ["", "basic", "shared"]
  79. // }
  80. // ],
  81. // "/event/": [
  82. // {
  83. // title: "事件", // 必要的
  84. // collapsable: false, // 可选的, 默认值是 true,建议改为false
  85. // sidebarDepth: 0, // 可选的, 默认值是 1,建议改为0
  86. // children: ["inspect","boxstool", "switchView", "moveCanvas"]
  87. // }
  88. // ],
  89. // "/hardfix/": [
  90. // {
  91. // title: "目录", // 必要的
  92. // collapsable: false, // 可选的, 默认值是 true,建议改为false
  93. // sidebarDepth: 0, // 可选的, 默认值是 1,建议改为0
  94. // children: ["", "open"]
  95. // }
  96. // ]
  97. },
  98. },
  99. configureWebpack: {
  100. resolve: {
  101. alias: {
  102. "@": path.join(__dirname, "../../src/"),
  103. },
  104. },
  105. },
  106. });