docusaurus.config.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. import { themes as prismThemes } from 'prism-react-renderer';
  2. import type { Config } from '@docusaurus/types';
  3. import type * as Preset from '@docusaurus/preset-classic';
  4. // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
  5. const config: Config = {
  6. title: 'Anubis',
  7. tagline: 'Weigh the soul of incoming HTTP requests using proof-of-work to stop AI crawlers',
  8. favicon: 'img/favicon.ico',
  9. // Set the production url of your site here
  10. url: 'https://anubis.techaro.lol',
  11. // Set the /<baseUrl>/ pathname under which your site is served
  12. // For GitHub pages deployment, it is often '/<projectName>/'
  13. baseUrl: '/',
  14. // GitHub pages deployment config.
  15. // If you aren't using GitHub pages, you don't need these.
  16. organizationName: 'TecharoHQ', // Usually your GitHub org/user name.
  17. projectName: 'anubis', // Usually your repo name.
  18. onBrokenLinks: 'throw',
  19. onBrokenMarkdownLinks: 'warn',
  20. // Even if you don't use internationalization, you can use this field to set
  21. // useful metadata like html lang. For example, if your site is Chinese, you
  22. // may want to replace "en" with "zh-Hans".
  23. i18n: {
  24. defaultLocale: 'en',
  25. locales: ['en'],
  26. },
  27. markdown: {
  28. mermaid: true,
  29. },
  30. themes: ['@docusaurus/theme-mermaid'],
  31. presets: [
  32. [
  33. 'classic',
  34. {
  35. docs: {
  36. sidebarPath: './sidebars.ts',
  37. // Please change this to your repo.
  38. // Remove this to remove the "edit this page" links.
  39. editUrl:
  40. 'https://github.com/TecharoHQ/anubis/tree/main/docs/',
  41. },
  42. blog: {
  43. showReadingTime: true,
  44. feedOptions: {
  45. type: ['rss', 'atom', "json"],
  46. xslt: true,
  47. },
  48. // Please change this to your repo.
  49. // Remove this to remove the "edit this page" links.
  50. editUrl:
  51. 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
  52. // Useful options to enforce blogging best practices
  53. onInlineTags: 'warn',
  54. onInlineAuthors: 'warn',
  55. onUntruncatedBlogPosts: 'warn',
  56. },
  57. theme: {
  58. customCss: './src/css/custom.css',
  59. },
  60. } satisfies Preset.Options,
  61. ],
  62. ],
  63. themeConfig: {
  64. colorMode: {
  65. respectPrefersColorScheme: true,
  66. },
  67. // Replace with your project's social card
  68. image: 'img/docusaurus-social-card.jpg',
  69. navbar: {
  70. title: 'Anubis',
  71. logo: {
  72. alt: 'A happy jackal woman with brown hair and red eyes',
  73. src: 'img/favicon.webp',
  74. },
  75. items: [
  76. {
  77. type: 'docSidebar',
  78. sidebarId: 'tutorialSidebar',
  79. position: 'left',
  80. label: 'Docs',
  81. },
  82. { to: '/blog', label: 'Blog', position: 'left' },
  83. {
  84. href: 'https://github.com/sponsors/Xe',
  85. label: "Sponsorship",
  86. position: 'left'
  87. },
  88. {
  89. href: 'https://github.com/TecharoHQ/anubis',
  90. label: 'GitHub',
  91. position: 'right',
  92. },
  93. ],
  94. },
  95. footer: {
  96. style: 'dark',
  97. links: [
  98. {
  99. title: 'Docs',
  100. items: [
  101. {
  102. label: 'Intro',
  103. to: '/docs/',
  104. },
  105. {
  106. label: "Installation",
  107. to: "/docs/admin/installation",
  108. },
  109. ],
  110. },
  111. {
  112. title: 'Community',
  113. items: [
  114. {
  115. label: 'GitHub Discussions',
  116. href: 'https://github.com/TecharoHQ/anubis/discussions',
  117. },
  118. {
  119. label: 'Bluesky',
  120. href: 'https://bsky.app/profile/techaro.lol',
  121. },
  122. ],
  123. },
  124. {
  125. title: 'More',
  126. items: [
  127. {
  128. label: 'Blog',
  129. to: '/blog',
  130. },
  131. {
  132. label: 'GitHub',
  133. href: 'https://github.com/TecharoHQ/anubis',
  134. },
  135. ],
  136. },
  137. ],
  138. copyright: `Copyright © ${new Date().getFullYear()} Techaro. Made with ❤️ in 🇨🇦.`,
  139. },
  140. prism: {
  141. theme: prismThemes.github,
  142. darkTheme: prismThemes.dracula,
  143. magicComments: [
  144. {
  145. className: 'code-block-diff-add-line',
  146. line: 'diff-add'
  147. },
  148. {
  149. className: 'code-block-diff-remove-line',
  150. line: 'diff-remove'
  151. }
  152. ],
  153. },
  154. } satisfies Preset.ThemeConfig,
  155. };
  156. export default config;