docusaurus.config.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // @ts-check
  2. const lightCodeTheme = require('prism-react-renderer/themes/github');
  3. const darkCodeTheme = require('prism-react-renderer/themes/dracula');
  4. /** @type {import('@docusaurus/types').Config} */
  5. const config = {
  6. title: 'swagger-jsdoc Official Documentation',
  7. tagline:
  8. 'Generates swagger/openapi specification based on jsDoc comments and YAML files.',
  9. url: 'https://github.com/Surnet/swagger-jsdoc',
  10. baseUrl: '/',
  11. onBrokenLinks: 'throw',
  12. onBrokenMarkdownLinks: 'warn',
  13. favicon: 'img/favicon.ico',
  14. organizationName: 'Surnet',
  15. projectName: 'swagger-jsdoc',
  16. i18n: {
  17. defaultLocale: 'en',
  18. locales: ['en'],
  19. },
  20. presets: [
  21. [
  22. 'classic',
  23. /** @type {import('@docusaurus/preset-classic').Options} */
  24. ({
  25. docs: {
  26. sidebarPath: require.resolve('./sidebars.js'),
  27. editUrl:
  28. 'https://github.com/Surnet/swagger-jsdoc/tree/master/docusaurus',
  29. },
  30. theme: {
  31. customCss: require.resolve('./src/css/custom.css'),
  32. },
  33. }),
  34. ],
  35. ],
  36. themeConfig:
  37. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  38. ({
  39. navbar: {
  40. title: 'swagger-jsdoc',
  41. // logo: {
  42. // alt: 'My Site Logo',
  43. // src: 'img/logo.svg',
  44. // },
  45. items: [
  46. {
  47. type: 'doc',
  48. docId: 'intro',
  49. position: 'left',
  50. label: 'Tutorial',
  51. },
  52. {
  53. href: 'https://github.com/Surnet/swagger-jsdoc',
  54. label: 'GitHub',
  55. position: 'right',
  56. },
  57. {
  58. type: 'docsVersionDropdown',
  59. },
  60. ],
  61. },
  62. footer: {
  63. style: 'dark',
  64. links: [
  65. {
  66. title: 'Docs',
  67. items: [
  68. {
  69. label: 'Tutorial',
  70. to: '/docs/intro',
  71. },
  72. ],
  73. },
  74. ],
  75. copyright: `Copyright © ${new Date().getFullYear()} swagger-jsdoc, Inc. Built with Docusaurus.`,
  76. },
  77. prism: {
  78. theme: lightCodeTheme,
  79. darkTheme: darkCodeTheme,
  80. },
  81. }),
  82. };
  83. module.exports = config;