config.js 4.7 KB

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