docusaurus.config.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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: 'Vendure Docs',
  8. tagline: 'Dinosaurs are cool',
  9. favicon: 'img/favicon.ico',
  10. // Set the production url of your site here
  11. url: 'https://docs.vendure.io',
  12. // Set the /<baseUrl>/ pathname under which your site is served
  13. // For GitHub pages deployment, it is often '/<projectName>/'
  14. baseUrl: '/',
  15. // GitHub pages deployment config.
  16. // If you aren't using GitHub pages, you don't need these.
  17. organizationName: 'vendure-ecommerce', // Usually your GitHub org/user name.
  18. projectName: 'vendure', // Usually your repo name.
  19. onBrokenLinks: 'throw',
  20. onBrokenMarkdownLinks: 'warn',
  21. // Even if you don't use internalization, you can use this field to set useful
  22. // metadata like html lang. For example, if your site is Chinese, you may want
  23. // to replace "en" with "zh-Hans".
  24. i18n: {
  25. defaultLocale: 'en',
  26. locales: ['en'],
  27. },
  28. presets: [
  29. [
  30. 'classic',
  31. /** @type {import('@docusaurus/preset-classic').Options} */
  32. ({
  33. docs: {
  34. sidebarPath: require.resolve('./sidebars.js'),
  35. // Please change this to your repo.
  36. // Remove this to remove the "edit this page" links.
  37. editUrl:
  38. 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
  39. },
  40. theme: {
  41. customCss: require.resolve('./src/css/custom.css'),
  42. },
  43. }),
  44. ],
  45. ],
  46. themeConfig:
  47. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  48. ({
  49. // Replace with your project's social card
  50. image: 'img/docusaurus-social-card.jpg',
  51. navbar: {
  52. title: 'My Site',
  53. logo: {
  54. alt: 'My Site Logo',
  55. src: 'img/logo.svg',
  56. },
  57. items: [
  58. {
  59. type: 'docSidebar',
  60. sidebarId: 'learnSidebar',
  61. position: 'left',
  62. label: 'Learn',
  63. },
  64. {
  65. type: 'docSidebar',
  66. sidebarId: 'referenceSidebar',
  67. position: 'left',
  68. label: 'Reference',
  69. },
  70. {
  71. href: 'https://github.com/facebook/docusaurus',
  72. label: 'GitHub',
  73. position: 'right',
  74. },
  75. ],
  76. },
  77. footer: {
  78. style: 'dark',
  79. links: [
  80. {
  81. title: 'Docs',
  82. items: [
  83. {
  84. label: 'Tutorial',
  85. to: '/docs/intro',
  86. },
  87. ],
  88. },
  89. {
  90. title: 'Community',
  91. items: [
  92. {
  93. label: 'Discord',
  94. href: 'https://vendure.io/community/',
  95. },
  96. {
  97. label: 'Twitter',
  98. href: 'https://twitter.com/vendure_io',
  99. },
  100. ],
  101. },
  102. ],
  103. copyright: `Copyright © ${new Date().getFullYear()} Vendure GmbH. Built with Docusaurus.`,
  104. },
  105. prism: {
  106. theme: lightCodeTheme,
  107. darkTheme: darkCodeTheme,
  108. },
  109. }),
  110. };
  111. module.exports = config;