docusaurus.config.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
  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. // Replace with your project's social card
  65. image: 'img/docusaurus-social-card.jpg',
  66. navbar: {
  67. title: 'Anubis',
  68. logo: {
  69. alt: 'A happy jackal woman with brown hair and red eyes',
  70. src: 'img/happy.webp',
  71. },
  72. items: [
  73. {
  74. type: 'docSidebar',
  75. sidebarId: 'tutorialSidebar',
  76. position: 'left',
  77. label: 'Tutorial',
  78. },
  79. // { to: '/blog', label: 'Blog', position: 'left' },
  80. {
  81. href: 'https://github.com/TecharoHQ/anubis',
  82. label: 'GitHub',
  83. position: 'right',
  84. },
  85. ],
  86. },
  87. footer: {
  88. style: 'dark',
  89. links: [
  90. {
  91. title: 'Docs',
  92. items: [
  93. {
  94. label: 'Intro',
  95. to: '/docs/',
  96. },
  97. {
  98. label: "Installation",
  99. to: "/docs/installation",
  100. },
  101. ],
  102. },
  103. {
  104. title: 'Community',
  105. items: [
  106. {
  107. label: 'GitHub Discussions',
  108. href: 'https://github.com/TecharoHQ/anubis/discussions',
  109. },
  110. {
  111. label: 'Bluesky',
  112. href: 'https://bsky.app/profile/techaro.lol',
  113. },
  114. ],
  115. },
  116. {
  117. title: 'More',
  118. items: [
  119. {
  120. label: 'Blog',
  121. to: '/blog',
  122. },
  123. {
  124. label: 'GitHub',
  125. href: 'https://github.com/TecharoHQ/anubis',
  126. },
  127. ],
  128. },
  129. ],
  130. copyright: `Copyright © ${new Date().getFullYear()} Techaro. Made with ❤️ in 🇨🇦.`,
  131. },
  132. prism: {
  133. theme: prismThemes.github,
  134. darkTheme: prismThemes.dracula,
  135. magicComments: [
  136. {
  137. className: 'code-block-diff-add-line',
  138. line: 'diff-add'
  139. },
  140. {
  141. className: 'code-block-diff-remove-line',
  142. line: 'diff-remove'
  143. }
  144. ],
  145. },
  146. } satisfies Preset.ThemeConfig,
  147. };
  148. export default config;