docusaurus.config.ts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 to protect your website!",
  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. blog: {
  36. showReadingTime: true,
  37. feedOptions: {
  38. type: ["rss", "atom", "json"],
  39. xslt: true,
  40. },
  41. editUrl: "https://github.com/TecharoHQ/anubis/tree/main/docs/",
  42. onInlineTags: "warn",
  43. onInlineAuthors: "warn",
  44. onUntruncatedBlogPosts: "throw",
  45. },
  46. docs: {
  47. sidebarPath: "./sidebars.ts",
  48. editUrl: "https://github.com/TecharoHQ/anubis/tree/main/docs/",
  49. },
  50. theme: {
  51. customCss: "./src/css/custom.css",
  52. },
  53. } satisfies Preset.Options,
  54. ],
  55. ],
  56. themeConfig: {
  57. colorMode: {
  58. respectPrefersColorScheme: true,
  59. },
  60. // Replace with your project's social card
  61. image: "img/social-card.jpg",
  62. navbar: {
  63. title: "Anubis",
  64. logo: {
  65. alt: "A happy jackal woman with brown hair and red eyes",
  66. src: "img/favicon.webp",
  67. },
  68. items: [
  69. { to: "/blog", label: "Blog", position: "left" },
  70. {
  71. type: "docSidebar",
  72. sidebarId: "tutorialSidebar",
  73. position: "left",
  74. label: "Docs",
  75. },
  76. {
  77. to: "/docs/admin/botstopper",
  78. label: "Unbranded Version",
  79. position: "left",
  80. },
  81. {
  82. href: "https://github.com/TecharoHQ/anubis",
  83. label: "GitHub",
  84. position: "right",
  85. },
  86. {
  87. href: "https://github.com/sponsors/Xe",
  88. label: "Sponsor the Project",
  89. position: "right",
  90. },
  91. ],
  92. },
  93. footer: {
  94. style: "dark",
  95. links: [
  96. {
  97. title: "Docs",
  98. items: [
  99. {
  100. label: "Intro",
  101. to: "/docs/",
  102. },
  103. {
  104. label: "Installation",
  105. to: "/docs/admin/installation",
  106. },
  107. ],
  108. },
  109. {
  110. title: "Community",
  111. items: [
  112. {
  113. label: "GitHub Discussions",
  114. href: "https://github.com/TecharoHQ/anubis/discussions",
  115. },
  116. {
  117. label: "Bluesky",
  118. href: "https://bsky.app/profile/techaro.lol",
  119. },
  120. ],
  121. },
  122. {
  123. title: "More",
  124. items: [
  125. {
  126. label: "Blog",
  127. to: "/blog",
  128. },
  129. {
  130. label: "GitHub",
  131. href: "https://github.com/TecharoHQ/anubis",
  132. },
  133. {
  134. label: "Status",
  135. href: "https://techarohq.github.io/status/",
  136. },
  137. ],
  138. },
  139. ],
  140. copyright: `Copyright © ${new Date().getFullYear()} Techaro. Made with ❤️ in 🇨🇦.`,
  141. },
  142. prism: {
  143. theme: prismThemes.github,
  144. darkTheme: prismThemes.dracula,
  145. magicComments: [
  146. {
  147. className: "code-block-diff-add-line",
  148. line: "diff-add",
  149. },
  150. {
  151. className: "code-block-diff-remove-line",
  152. line: "diff-remove",
  153. },
  154. ],
  155. },
  156. } satisfies Preset.ThemeConfig,
  157. };
  158. export default config;