config.js 6.1 KB

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