config.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. text: "平面图嵌入指南",
  90. link: "/guides/tDInsert/brief.md"
  91. },
  92. {
  93. text: "拓扑图嵌入指南",
  94. link: "/guides/tuopuInsert/brief.md"
  95. }
  96. ]
  97. },
  98. {
  99. text: "接口",
  100. items: [
  101. {text: 'web 接口', link: "/guides/interface/"},
  102. ]
  103. },
  104. ]
  105. },
  106. {
  107. text: "开发规范",
  108. items: [
  109. {text: "javascript", link: "/standard/javascript.md"},
  110. {text: "typescript", link: "/standard/typescript/"},
  111. {text: "约定", link: "/standard/appoint.md"},
  112. {text: "git", link: "/standard/git.md"},
  113. {text: "typescript 自动生成 api 文档", link: "/standard/typedoc.md"},
  114. ]
  115. },
  116. {
  117. text: "API参考",
  118. items: [{
  119. text: "图形引擎",
  120. link: "http://doc.sagacloud.cn/api/web/graph/"
  121. },
  122. {
  123. text: "建筑信息图",
  124. link: "http://doc.sagacloud.cn/api/web/big/"
  125. },
  126. {
  127. text: "编辑器",
  128. link: "http://doc.sagacloud.cn/api/web/edit/"
  129. },
  130. ]
  131. },
  132. // {
  133. // text: "概念解释",
  134. // items: [{
  135. // text: "系统图相关",
  136. // items: [{
  137. // text: "系统图",
  138. // link: "/notion/system/system.md"
  139. // },]
  140. // }, {
  141. // text: "服务相关",
  142. // items: [{
  143. // text: "数据中台",
  144. // link: "/notion/middle/middle.md"
  145. // }, {
  146. // text: "数据中心",
  147. // link: "/notion/center/center.md"
  148. // }, {
  149. // text: "蜡笔森林",
  150. // link: "/notion/crayon/crayon.md"
  151. // }]
  152. // }, {
  153. // text: "Revit",
  154. // items: [{
  155. // text: "Revit",
  156. // link: "/notion/revit/revit.md"
  157. // }]
  158. // }]
  159. // }
  160. ],
  161. displayAllHeaders: true,
  162. sidebarDepth: 0,
  163. sidebar: {
  164. "/setup/": setupContent,
  165. "/guides/": graphContent,
  166. // "/notion": notionContent,
  167. "/standard": standardContent
  168. }
  169. },
  170. module: {
  171. rules: [{
  172. test: /\.less$/,
  173. loader: 'less-loader', // compiles Less to CSS
  174. },],
  175. },
  176. devServer: {
  177. proxy: {
  178. '/gogs': {
  179. target: 'http://39.106.8.246:3003',
  180. changeOrigin: true,
  181. secure: false,
  182. pathRewrite: {
  183. '^/gogs': '',
  184. },
  185. bypass: function (req, res, proxyOptions) {
  186. req.headers["Authorization"] = "Basic bGJzbDoyMDIwMDgyOQ==";
  187. }
  188. },
  189. '/labsl': {
  190. target: 'http://39.102.40.239:8080',
  191. changeOrigin: true,
  192. secure: false,
  193. },
  194. // 图片服务器
  195. '/image-service': {
  196. target: 'http://adm.sagacloud.cn',
  197. changeOrigin: true,
  198. secure: false,
  199. },
  200. }
  201. },
  202. };