2
0

docusaurus.config.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. // @ts-check
  2. // `@type` JSDoc annotations allow editor autocompletion and type checking
  3. // (when paired with `@ts-check`).
  4. // There are various equivalent ways to declare your Docusaurus config.
  5. // See: https://docusaurus.io/docs/api/docusaurus-config
  6. import {themes as prismThemes} from 'prism-react-renderer';
  7. /** @type {import('@docusaurus/types').Config} */
  8. const config = {
  9. title: 'MaxKey单点登录认证系统',
  10. tagline: '业界领先的IAM身份管理和认证产品',
  11. favicon: 'img/favicon.ico',
  12. // Set the production url of your site here
  13. url: 'https://www.maxkey.top',
  14. // Set the /<baseUrl>/ pathname under which your site is served
  15. // For GitHub pages deployment, it is often '/<projectName>/'
  16. baseUrl: '/doc',
  17. staticDirectories: ['static'],
  18. // GitHub pages deployment config.
  19. // If you aren't using GitHub pages, you don't need these.
  20. organizationName: 'Dromara', // Usually your GitHub org/user name.
  21. projectName: 'MaxKey', // Usually your repo name.
  22. onBrokenLinks: 'throw',
  23. onBrokenMarkdownLinks: 'warn',
  24. // Even if you don't use internationalization, you can use this field to set
  25. // useful metadata like html lang. For example, if your site is Chinese, you
  26. // may want to replace "en" with "zh-Hans".
  27. i18n: {
  28. defaultLocale: 'zh',
  29. locales: ['en','zh'],
  30. localeConfigs: {
  31. en: {
  32. htmlLang: 'en',
  33. },
  34. // You can omit a locale (e.g. fr) if you don't need to override the defaults
  35. zh: {
  36. htmlLang: 'zh',
  37. },
  38. },
  39. },
  40. presets: [
  41. [
  42. 'classic',
  43. /** @type {import('@docusaurus/preset-classic').Options} */
  44. ({
  45. docs: {
  46. sidebarPath: './sidebars.js',
  47. lastVersion: 'current',
  48. versions: {
  49. current: {
  50. label: '4.1.x',
  51. path: '',
  52. },
  53. },
  54. // Please change this to your repo.
  55. // Remove this to remove the "edit this page" links.
  56. editUrl:
  57. 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
  58. },
  59. blog: {
  60. showReadingTime: true,
  61. // Please change this to your repo.
  62. // Remove this to remove the "edit this page" links.
  63. editUrl:
  64. 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
  65. },
  66. theme: {
  67. //customCss: './src/css/custom.css','./static/font-awesome-4.7.0/css/font-awesome.min.css',
  68. customCss: [require.resolve('./src/css/custom.css'),require.resolve('./static/font-awesome-4.7.0/css/font-awesome.min.css')],
  69. },
  70. }),
  71. ],
  72. ],
  73. scripts: [
  74. {
  75. src: 'https://www.maxkey.top/doc/jquery.min.js'
  76. }],
  77. plugins: [
  78. [
  79. '@docusaurus/plugin-content-docs',
  80. {
  81. id: 'about',
  82. path: 'about',
  83. //editUrl: `https://github.com/${organizationName}/${projectName}/edit/${branch}/website/`,
  84. routeBasePath: 'about',
  85. sidebarPath: require.resolve('./sidebars.js'),
  86. },
  87. ],
  88. ],
  89. themeConfig:
  90. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  91. ({
  92. // Replace with your project's social card
  93. image: 'img/docusaurus-social-card.jpg',
  94. navbar: {
  95. //title: 'MaxKey',
  96. logo: {
  97. alt: 'MaxKey Logo',
  98. src: 'images/logo_maxkey.png',
  99. },
  100. items: [
  101. {
  102. to: 'http://www.maxkey.top/',
  103. position: 'right',
  104. label: '首页',
  105. },
  106. {
  107. type: 'docsVersionDropdown',
  108. position: 'right',
  109. //dropdownItemsBefore: [{to: '/docs', label: '当前版本'}],
  110. dropdownActiveClassDisabled: true,
  111. },
  112. {
  113. to: 'https://www.maxkey.top/zh/about/cevsenterprise.html',
  114. position: 'right',
  115. label: '企业版',
  116. },
  117. /*{
  118. to: 'https://www.maxkey.top/zh/about/cevscas.html',
  119. label: '同类对比',
  120. items: [
  121. {to: '/about/welcome', label: '概述'},
  122. {to: '/about/news', label: '新闻动态'},
  123. {to: '/about/team', label: '项目团队'},
  124. {to: '/about/licenses', label: '项目许可证'},
  125. {to: '/about/dependency', label: '项目依赖'},
  126. {to: '/about/cevsenterprise', label: '企业版'},
  127. {to: '/about/cevscas', label: '同类对比'},
  128. {to: '/about/roadmap', label: '开发路线图'},
  129. ],
  130. position: 'right'
  131. },*/
  132. {
  133. type: 'localeDropdown',
  134. position: 'right',
  135. },
  136. ],
  137. },
  138. /*
  139. footer: {
  140. style: 'dark',
  141. links: [
  142. {
  143. title: 'Docs',
  144. items: [
  145. {
  146. label: 'Tutorial',
  147. to: '/docs/intro',
  148. },
  149. ],
  150. },
  151. {
  152. title: 'Community',
  153. items: [
  154. {
  155. label: 'Stack Overflow',
  156. href: 'https://stackoverflow.com/questions/tagged/docusaurus',
  157. },
  158. {
  159. label: 'Discord',
  160. href: 'https://discordapp.com/invite/docusaurus',
  161. },
  162. {
  163. label: 'Twitter',
  164. href: 'https://twitter.com/docusaurus',
  165. },
  166. ],
  167. },
  168. {
  169. title: 'More',
  170. items: [
  171. {
  172. label: 'Blog',
  173. to: '/blog',
  174. },
  175. {
  176. label: 'GitHub',
  177. href: 'https://github.com/facebook/docusaurus',
  178. },
  179. ],
  180. },
  181. ],
  182. copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
  183. },*/
  184. footer: {
  185. style: 'dark',
  186. copyright: `<a href="https://dromara.org/zh/projects/" target="_blank"><img style=" width: 70px;" src="https://www.maxkey.top/doc/images/partners/dromara.jpg?202210250857" title="Dromara"></img></a><img style="height: 70px;" src="https://www.maxkey.top/doc/images/dromara/zsxq.jpg" title="Dromara"></img><br/>Copyright © ${new Date().getFullYear()} <a href="https://www.maxkey.top/">maxkey.top</a> of Dromara . All rights reserved . Built with Docusaurus.`,
  187. },
  188. prism: {
  189. theme: prismThemes.github,
  190. darkTheme: prismThemes.dracula,
  191. additionalLanguages: ['powershell','java','php','python']
  192. },
  193. }),
  194. };
  195. export default config;