docusaurus.config.js 3.5 KB

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