docusaurus.config.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import type * as Preset from "@docusaurus/preset-classic";
  2. import type { Config } from "@docusaurus/types";
  3. import { themes as prismThemes } from "prism-react-renderer";
  4. const config: Config = {
  5. title: "OpenDevin",
  6. tagline: "Code Less, Make More",
  7. favicon: "img/logo.png",
  8. // Set the production url of your site here
  9. url: "https://docs.all-hands.dev",
  10. baseUrl: "/",
  11. // GitHub pages deployment config.
  12. organizationName: "OpenDevin",
  13. projectName: "OpenDevin",
  14. trailingSlash: false,
  15. onBrokenLinks: "throw",
  16. onBrokenMarkdownLinks: "warn",
  17. // Even if you don't use internationalization, you can use this field to set
  18. // useful metadata like html lang. For example, if your site is Chinese, you
  19. // may want to replace "en" with "zh-Hans".
  20. i18n: {
  21. defaultLocale: 'en',
  22. locales: ['en', 'fr', 'zh-Hans'],
  23. localeConfigs: {
  24. en: {
  25. htmlLang: 'en-GB',
  26. },
  27. },
  28. },
  29. presets: [
  30. [
  31. "classic",
  32. {
  33. docs: {
  34. path: "modules",
  35. routeBasePath: "modules",
  36. sidebarPath: "./sidebars.ts",
  37. exclude: [
  38. // '**/_*.{js,jsx,ts,tsx,md,mdx}',
  39. // '**/_*/**',
  40. "**/*.test.{js,jsx,ts,tsx}",
  41. "**/__tests__/**",
  42. ],
  43. },
  44. blog: {
  45. showReadingTime: true,
  46. },
  47. theme: {
  48. customCss: "./src/css/custom.css",
  49. },
  50. } satisfies Preset.Options,
  51. ],
  52. ],
  53. themeConfig: {
  54. image: "img/docusaurus.png",
  55. navbar: {
  56. title: "OpenDevin",
  57. logo: {
  58. alt: "OpenDevin",
  59. src: "img/logo.png",
  60. },
  61. items: [
  62. {
  63. type: "docSidebar",
  64. sidebarId: "docsSidebar",
  65. position: "left",
  66. label: "Docs",
  67. },
  68. {
  69. type: "docSidebar",
  70. sidebarId: "apiSidebar",
  71. position: "left",
  72. label: "Codebase",
  73. },
  74. { to: "/faq", label: "FAQ", position: "left" },
  75. {
  76. href: "https://github.com/OpenDevin/OpenDevin",
  77. label: "GitHub",
  78. position: "right",
  79. },
  80. {
  81. type: 'localeDropdown',
  82. position: 'left',
  83. },
  84. ],
  85. },
  86. prism: {
  87. theme: prismThemes.oneLight,
  88. darkTheme: prismThemes.oneDark,
  89. },
  90. } satisfies Preset.ThemeConfig,
  91. };
  92. export default config;