docusaurus.config.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. showLastUpdateAuthor: true,
  33. showLastUpdateTime: true,
  34. },
  35. theme: {
  36. customCss: [
  37. require.resolve("./src/css/custom.scss"),
  38. require.resolve("../src/packages/excalidraw/example/App.scss"),
  39. ],
  40. },
  41. }),
  42. ],
  43. ],
  44. themeConfig:
  45. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  46. ({
  47. colorMode: {
  48. respectPrefersColorScheme: true,
  49. },
  50. navbar: {
  51. title: "Excalidraw",
  52. logo: {
  53. alt: "Excalidraw Logo",
  54. src: "img/logo.svg",
  55. },
  56. items: [
  57. {
  58. to: "/docs",
  59. position: "left",
  60. label: "Docs",
  61. },
  62. {
  63. to: "https://blog.excalidraw.com",
  64. label: "Blog",
  65. position: "left",
  66. },
  67. {
  68. to: "https://github.com/excalidraw/excalidraw",
  69. label: "GitHub",
  70. position: "right",
  71. },
  72. ],
  73. },
  74. footer: {
  75. style: "dark",
  76. links: [
  77. {
  78. title: "Docs",
  79. items: [
  80. {
  81. label: "Get Started",
  82. to: "/docs",
  83. },
  84. ],
  85. },
  86. {
  87. title: "Community",
  88. items: [
  89. {
  90. label: "Discord",
  91. href: "https://discord.gg/UexuTaE",
  92. },
  93. {
  94. label: "Twitter",
  95. href: "https://twitter.com/excalidraw",
  96. },
  97. {
  98. label: "Linkedin",
  99. href: "https://www.linkedin.com/company/excalidraw",
  100. },
  101. ],
  102. },
  103. {
  104. title: "More",
  105. items: [
  106. {
  107. label: "Blog",
  108. to: "https://blog.excalidraw.com",
  109. },
  110. {
  111. label: "GitHub",
  112. to: "https://github.com/excalidraw/excalidraw",
  113. },
  114. ],
  115. },
  116. ],
  117. copyright: `Copyright © 2023 Excalidraw community. Built with Docusaurus ❤️`,
  118. },
  119. prism: {
  120. theme: require("prism-react-renderer/themes/dracula"),
  121. },
  122. image: "img/og-image.png",
  123. docs: {
  124. sidebar: {
  125. hideable: true,
  126. },
  127. },
  128. tableOfContents: {
  129. maxHeadingLevel: 4,
  130. },
  131. algolia: {
  132. appId: "8FEAOD28DI",
  133. apiKey: "4b07cca33ff2d2919bc95ff98f148e9e",
  134. indexName: "excalidraw",
  135. },
  136. }),
  137. themes: ["@docusaurus/theme-live-codeblock"],
  138. plugins: ["docusaurus-plugin-sass"],
  139. };
  140. module.exports = config;