config.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. const setupContent = require("../setup/index");
  2. const graphContent = require("../guides/index");
  3. const notionContent = require('../notion/index')
  4. module.exports = {
  5. title: "博锐尚格 Web 组件开发文档",
  6. description: "博锐尚格 Web 组件开发文档",
  7. base: "/web/",
  8. plugins: [
  9. "@vuepress/last-updated",
  10. "plugin-back-to-top",
  11. [
  12. 'vuepress-plugin-typescript',
  13. {
  14. tsLoaderOptions: {},
  15. },
  16. ],
  17. [
  18. 'vuepress-plugin-mathjax',
  19. {
  20. target: 'svg',
  21. macros: {
  22. '*': '\\times',
  23. },
  24. },
  25. ],
  26. ],
  27. markdown: {
  28. lineNumbers: true
  29. },
  30. themeConfig: {
  31. logo: "/assets/img/logo.png",
  32. nav: [{
  33. text: "首页",
  34. link: "/"
  35. },
  36. {
  37. text: "安装配置",
  38. items: [{
  39. text: "开发环境",
  40. items: [{
  41. text: "IDEA",
  42. link: "/setup/ide/idea"
  43. },
  44. {
  45. text: "VS Code",
  46. link: "/setup/ide/vscode"
  47. },
  48. {
  49. text: "Node.js",
  50. link: "/setup/ide/nodejs"
  51. },
  52. {
  53. text: "vue-cli",
  54. link: "/setup/ide/vuecli"
  55. },
  56. {
  57. text: "plantUML",
  58. link: "/setup/ide/plantUML"
  59. }
  60. ]
  61. },
  62. {
  63. text: "服务器",
  64. items: [{
  65. text: "基础配置",
  66. link: "/setup/server/nginx"
  67. },{
  68. text: "应用配置",
  69. link: "/setup/application/tuopu"
  70. }
  71. ]
  72. },
  73. ]
  74. },
  75. {
  76. text: "开发文档",
  77. items: [
  78. {
  79. text: "引擎",
  80. items: [
  81. {text: "数据格式", link: "/guides/format/floorMap.md"},
  82. {text: "图形引擎", link: "/guides/engine/"},
  83. {text: "场景管理", link: "/guides/scene/"},
  84. {text: "楼层平面图", link: "/guides/big/"},
  85. // {text: "系统图", link: "/guides/system-diagram/"},
  86. {text: "编辑器", link: "/guides/edit/"}
  87. ]
  88. },
  89. ]
  90. },
  91. {
  92. text:"开发规范",
  93. items: [
  94. // {text: "javascript", link: "/guides/standard/javascript.md"},
  95. // {text: "typescript", link: "/guides/standard/typescript.md"},
  96. {text: "约定", link: "/guides/standard/appoint.md"},
  97. {text: "git", link: "/guides/standard/git.md"}
  98. ]
  99. },
  100. {
  101. text: "API参考",
  102. items: [{
  103. text: "图形引擎",
  104. link: "http://doc.sagacloud.cn/api/web/graph/"
  105. },
  106. {
  107. text: "建筑信息图",
  108. link: "http://doc.sagacloud.cn/api/web/big/"
  109. },
  110. {
  111. text: "编辑器",
  112. link: "http://doc.sagacloud.cn/api/web/edit/"
  113. }
  114. ]
  115. },
  116. // {
  117. // text: "概念解释",
  118. // items: [{
  119. // text: "系统图相关",
  120. // items: [{
  121. // text: "系统图",
  122. // link: "/notion/system/system.md"
  123. // },]
  124. // }, {
  125. // text: "服务相关",
  126. // items: [{
  127. // text: "数据中台",
  128. // link: "/notion/middle/middle.md"
  129. // }, {
  130. // text: "数据中心",
  131. // link: "/notion/center/center.md"
  132. // }, {
  133. // text: "蜡笔森林",
  134. // link: "/notion/crayon/crayon.md"
  135. // }]
  136. // }, {
  137. // text: "Revit",
  138. // items: [{
  139. // text: "Revit",
  140. // link: "/notion/revit/revit.md"
  141. // }]
  142. // }]
  143. // }
  144. ],
  145. displayAllHeaders: true,
  146. sidebarDepth: 0,
  147. sidebar: {
  148. "/setup/": setupContent,
  149. "/guides/": graphContent,
  150. "/notion": notionContent
  151. }
  152. },
  153. module: {
  154. rules: [{
  155. test: /\.less$/,
  156. loader: 'less-loader', // compiles Less to CSS
  157. }, ],
  158. },
  159. devServer :{
  160. proxy: {
  161. '/gogs': {
  162. target: 'http://39.106.8.246:3003',
  163. changeOrigin: true,
  164. secure: false,
  165. pathRewrite: {
  166. '^/gogs': '',
  167. },
  168. bypass: function(req, res, proxyOptions) {
  169. req.headers["Authorization"] = "Basic bGJzbDoyMDIwMDgyOQ=="
  170. }
  171. }
  172. }
  173. },
  174. };