docusaurus.config.js 3.1 KB

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