docusaurus.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. // @ts-check
  2. // Note: type annotations allow type checking and IDEs autocompletion
  3. // const lightCodeTheme = require("prism-react-renderer/themes/github");
  4. // const darkCodeTheme = require("prism-react-renderer/themes/dracula");
  5. /** @type {import('@docusaurus/types').Config} */
  6. const config = {
  7. title: "雷池 WAF 社区版",
  8. tagline: "",
  9. favicon: "images/favicon.ico",
  10. // Set the production url of your site here
  11. url: "https://waf-ce.chaitin.cn/",
  12. // Set the /<baseUrl>/ pathname under which your site is served
  13. // For GitHub pages deployment, it is often '/<projectName>/'
  14. baseUrl: "/docs",
  15. // GitHub pages deployment config.
  16. // If you aren't using GitHub pages, you don't need these.
  17. organizationName: "chaitin", // Usually your GitHub org/user name.
  18. projectName: "document", // Usually your repo name.
  19. onBrokenLinks: "throw",
  20. onBrokenMarkdownLinks: "warn",
  21. // Even if you don't use internalization, you can use this field to set useful
  22. // metadata like html lang. For example, if your site is Chinese, you may want
  23. // to replace "en" with "zh-Hans".
  24. i18n: {
  25. defaultLocale: "zh-Hans",
  26. locales: ["zh-Hans"],
  27. },
  28. themes: [
  29. [
  30. // @ts-ignore
  31. require.resolve("@easyops-cn/docusaurus-search-local"),
  32. /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
  33. // @ts-ignore
  34. ({
  35. docsRouteBasePath: "/",
  36. // ... Your options.
  37. // `hashed` is recommended as long-term-cache of index file is possible.
  38. hashed: true,
  39. // For Docs using Chinese, The `language` is recommended to set to:
  40. // ```
  41. language: ["en", "zh"],
  42. // ```
  43. }),
  44. ],
  45. ],
  46. presets: [
  47. [
  48. "classic",
  49. /** @type {import('@docusaurus/preset-classic').Options} */
  50. ({
  51. docs: {
  52. routeBasePath: "/",
  53. sidebarPath: require.resolve("./sidebars.js"),
  54. // Remove this to remove the "edit this page" links.
  55. // editUrl: "https://github.com/chaitin/safeline/tree/main/website",
  56. },
  57. blog: false,
  58. theme: {
  59. customCss: require.resolve("./src/css/custom.css"),
  60. },
  61. }),
  62. ],
  63. ],
  64. themeConfig:
  65. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  66. ({
  67. // Replace with your project's social card
  68. image: "images/safeline.svg",
  69. docs: {
  70. sidebar: {
  71. autoCollapseCategories: true,
  72. },
  73. },
  74. navbar: {
  75. title: "",
  76. logo: { alt: "Logo", src: "images/safeline.svg", href: "https://waf-ce.chaitin.cn" },
  77. items: [
  78. {
  79. to: "https://www.bilibili.com/medialist/detail/ml2342694989",
  80. label: "教学视频",
  81. position: "right",
  82. },
  83. {
  84. to: "https://demo.waf-ce.chaitin.cn:9443/dashboard",
  85. label: "演示环境",
  86. position: "right",
  87. },
  88. ],
  89. },
  90. footer: {
  91. style: "dark",
  92. links: [
  93. {
  94. title: "雷池 SafeLine",
  95. items: [
  96. {
  97. label: "主页",
  98. to: "https://waf-ce.chaitin.cn",
  99. },
  100. {
  101. label: "开发计划",
  102. to: "https://waf-ce.chaitin.cn/community",
  103. },
  104. {
  105. label: "付费版本",
  106. to: "https://waf-ce.chaitin.cn/version",
  107. },
  108. ],
  109. },
  110. {
  111. title: "资源",
  112. items: [
  113. // {
  114. // label: "技术文档",
  115. // to: "/",
  116. // },
  117. {
  118. label: "教学视频",
  119. to: "https://www.bilibili.com/medialist/detail/ml2342694989",
  120. },
  121. // {
  122. // label: "学习资料",
  123. // to: "/",
  124. // },
  125. // {
  126. // label: "更新日志",
  127. // to: "/about/changelog",
  128. // },
  129. ],
  130. },
  131. {
  132. title: "关于我们",
  133. items: [
  134. {
  135. label: "长亭科技",
  136. to: "https://www.chaitin.cn/zh/",
  137. },
  138. {
  139. label: "CT Stack 安全社区",
  140. to: "https://stack.chaitin.cn/",
  141. },
  142. ],
  143. },
  144. ],
  145. copyright: `Copyright © ${new Date().getFullYear()} 北京长亭科技有限公司.All rights reserved.`,
  146. },
  147. prism: {
  148. // theme: lightCodeTheme,
  149. // darkTheme: darkCodeTheme,
  150. },
  151. colorMode: {
  152. defaultMode: 'light',
  153. disableSwitch: true,
  154. },
  155. }),
  156. };
  157. module.exports = config;