config.js 5.8 KB

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