docusaurus.config.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // @ts-check
  2. // Note: type annotations allow type checking and IDEs autocompletion
  3. /** @type {import('@docusaurus/types').Config} */
  4. const config = {
  5. title: "Excalidraw developer docs",
  6. tagline:
  7. "For Excalidraw contributors or those integrating the Excalidraw editor",
  8. url: "https://docs.excalidraw.com",
  9. baseUrl: "/",
  10. onBrokenLinks: "throw",
  11. onBrokenMarkdownLinks: "warn",
  12. favicon: "img/favicon.ico",
  13. organizationName: "Excalidraw", // Usually your GitHub org/user name.
  14. projectName: "excalidraw", // Usually your repo name.
  15. // Even if you don't use internalization, you can use this field to set useful
  16. // metadata like html lang. For example, if your site is Chinese, you may want
  17. // to replace "en" with "zh-Hans".
  18. i18n: {
  19. defaultLocale: "en",
  20. locales: ["en"],
  21. },
  22. presets: [
  23. [
  24. "classic",
  25. /** @type {import('@docusaurus/preset-classic').Options} */
  26. ({
  27. docs: {
  28. sidebarPath: require.resolve("./sidebars.js"),
  29. // Please change this to your repo.
  30. editUrl:
  31. "https://github.com/excalidraw/excalidraw/tree/master/dev-docs/",
  32. },
  33. theme: {
  34. customCss: [
  35. require.resolve("./src/css/custom.scss"),
  36. require.resolve("../src/packages/excalidraw/example/App.scss"),
  37. ],
  38. },
  39. }),
  40. ],
  41. ],
  42. themeConfig:
  43. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  44. ({
  45. colorMode: {
  46. respectPrefersColorScheme: true,
  47. },
  48. navbar: {
  49. title: "Excalidraw",
  50. logo: {
  51. alt: "Excalidraw Logo",
  52. src: "img/logo.svg",
  53. },
  54. items: [
  55. {
  56. to: "/docs",
  57. position: "left",
  58. label: "Docs",
  59. },
  60. {
  61. to: "https://blog.excalidraw.com",
  62. label: "Blog",
  63. position: "left",
  64. },
  65. {
  66. to: "https://github.com/excalidraw/excalidraw",
  67. label: "GitHub",
  68. position: "right",
  69. },
  70. ],
  71. },
  72. footer: {
  73. style: "dark",
  74. links: [
  75. {
  76. title: "Docs",
  77. items: [
  78. {
  79. label: "Get Started",
  80. to: "/docs",
  81. },
  82. ],
  83. },
  84. {
  85. title: "Community",
  86. items: [
  87. {
  88. label: "Discord",
  89. href: "https://discord.gg/UexuTaE",
  90. },
  91. {
  92. label: "Twitter",
  93. href: "https://twitter.com/excalidraw",
  94. },
  95. {
  96. label: "Linkedin",
  97. href: "https://www.linkedin.com/company/excalidraw",
  98. },
  99. ],
  100. },
  101. {
  102. title: "More",
  103. items: [
  104. {
  105. label: "Blog",
  106. to: "https://blog.excalidraw.com",
  107. },
  108. {
  109. label: "GitHub",
  110. to: "https://github.com/excalidraw/excalidraw",
  111. },
  112. ],
  113. },
  114. ],
  115. copyright: `Copyright © 2023 Excalidraw community. Built with Docusaurus ❤️`,
  116. },
  117. prism: {
  118. theme: require("prism-react-renderer/themes/dracula"),
  119. },
  120. image: "img/og-image.png",
  121. docs: {
  122. sidebar: {
  123. hideable: true,
  124. },
  125. },
  126. tableOfContents: {
  127. maxHeadingLevel: 4,
  128. },
  129. }),
  130. themes: ["@docusaurus/theme-live-codeblock"],
  131. plugins: ["docusaurus-plugin-sass"],
  132. };
  133. module.exports = config;