docusaurus.config.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. navbar: {
  70. title: "",
  71. logo: { alt: "Logo", src: "images/safeline.svg", href: "https://waf-ce.chaitin.cn" },
  72. items: [
  73. {
  74. to: "https://www.bilibili.com/medialist/detail/ml2342694989",
  75. label: "教学视频",
  76. position: "right",
  77. },
  78. {
  79. to: "https://demo.waf-ce.chaitin.cn:9443/dashboard",
  80. label: "演示环境",
  81. position: "right",
  82. },
  83. ],
  84. },
  85. footer: {
  86. style: "dark",
  87. links: [
  88. {
  89. title: "雷池 SafeLine",
  90. items: [
  91. {
  92. label: "主页",
  93. to: "https://waf-ce.chaitin.cn",
  94. },
  95. {
  96. label: "社区",
  97. to: "https://waf-ce.chaitin.cn/community",
  98. },
  99. {
  100. label: "版本对比",
  101. to: "https://waf-ce.chaitin.cn/version",
  102. },
  103. ],
  104. },
  105. {
  106. title: "资源",
  107. items: [
  108. // {
  109. // label: "技术文档",
  110. // to: "/",
  111. // },
  112. {
  113. label: "教学视频",
  114. to: "https://www.bilibili.com/medialist/detail/ml2342694989",
  115. },
  116. // {
  117. // label: "学习资料",
  118. // to: "/",
  119. // },
  120. // {
  121. // label: "更新日志",
  122. // to: "/about/changelog",
  123. // },
  124. ],
  125. },
  126. {
  127. title: "关于我们",
  128. items: [
  129. {
  130. label: "长亭科技",
  131. to: "https://www.chaitin.cn/zh/",
  132. },
  133. {
  134. label: "CT Stack 安全社区",
  135. to: "https://stack.chaitin.cn/",
  136. },
  137. ],
  138. },
  139. ],
  140. copyright: `Copyright © ${new Date().getFullYear()} 北京长亭科技有限公司.All rights reserved.`,
  141. },
  142. prism: {
  143. // theme: lightCodeTheme,
  144. // darkTheme: darkCodeTheme,
  145. },
  146. colorMode: {
  147. defaultMode: 'light',
  148. disableSwitch: true,
  149. },
  150. }),
  151. };
  152. module.exports = config;