docusaurus.config.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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: "OpenHands",
  6. tagline: "Code Less, Make More",
  7. favicon: "img/logo-square.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: "All-Hands-AI",
  13. projectName: "OpenHands",
  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. markdown: {
  30. mermaid: true,
  31. },
  32. themes: ['@docusaurus/theme-mermaid'],
  33. presets: [
  34. [
  35. "classic",
  36. {
  37. docs: {
  38. path: "modules",
  39. routeBasePath: "modules",
  40. sidebarPath: "./sidebars.ts",
  41. exclude: [
  42. // '**/_*.{js,jsx,ts,tsx,md,mdx}',
  43. // '**/_*/**',
  44. "**/*.test.{js,jsx,ts,tsx}",
  45. "**/__tests__/**",
  46. ],
  47. },
  48. blog: {
  49. showReadingTime: true,
  50. },
  51. theme: {
  52. customCss: "./src/css/custom.css",
  53. },
  54. } satisfies Preset.Options,
  55. ],
  56. ],
  57. themeConfig: {
  58. image: "img/docusaurus.png",
  59. navbar: {
  60. title: "OpenHands",
  61. logo: {
  62. alt: "OpenHands",
  63. src: "img/logo.png",
  64. },
  65. items: [
  66. {
  67. type: "docSidebar",
  68. sidebarId: "docsSidebar",
  69. position: "left",
  70. label: "User Guides",
  71. },
  72. {
  73. type: "docSidebar",
  74. sidebarId: "apiSidebar",
  75. position: "left",
  76. label: "Python API",
  77. },
  78. {
  79. type: 'localeDropdown',
  80. position: 'left',
  81. },
  82. {
  83. href: "https://all-hands.dev",
  84. label: "Company",
  85. position: "right",
  86. },
  87. {
  88. href: "https://github.com/All-Hands-AI/OpenHands",
  89. label: "GitHub",
  90. position: "right",
  91. },
  92. ],
  93. },
  94. prism: {
  95. theme: prismThemes.oneLight,
  96. darkTheme: prismThemes.oneDark,
  97. },
  98. } satisfies Preset.ThemeConfig,
  99. };
  100. export default config;