docusaurus.config.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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: 'WebSerial Docs',
  8. tagline: 'A remote terminal for wireless microcontrollers',
  9. url: 'https://docs.webserial.pro',
  10. baseUrl: '/',
  11. onBrokenLinks: 'warn',
  12. onBrokenMarkdownLinks: 'warn',
  13. // favicon: 'img/dash-mini-logo.ico',
  14. // GitHub pages deployment config.
  15. // If you aren't using GitHub pages, you don't need these.
  16. organizationName: 'ayushsharma82', // Usually your GitHub org/user name.
  17. projectName: 'WebSerial', // Usually your repo name.
  18. deploymentBranch: 'gh-pages',
  19. trailingSlash: true,
  20. // Even if you don't use internalization, you can use this field to set useful
  21. // metadata like html lang. For example, if your site is Chinese, you may want
  22. // to replace "en" with "zh-Hans".
  23. i18n: {
  24. defaultLocale: 'en',
  25. locales: ['en'],
  26. },
  27. presets: [
  28. [
  29. 'classic',
  30. /** @type {import('@docusaurus/preset-classic').Options} */
  31. ({
  32. gtag: {
  33. trackingID: 'G-BCT2ENBRLE',
  34. anonymizeIP: true,
  35. },
  36. docs: {
  37. disableVersioning: true,
  38. routeBasePath: '/',
  39. sidebarPath: require.resolve('./sidebars.js'),
  40. },
  41. blog: false,
  42. theme: {
  43. customCss: require.resolve('./src/css/custom.css'),
  44. },
  45. sitemap: {
  46. changefreq: 'weekly',
  47. priority: 0.5,
  48. ignorePatterns: ['/tags/**'],
  49. filename: 'sitemap.xml',
  50. },
  51. }),
  52. ],
  53. ],
  54. themeConfig:
  55. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  56. ({
  57. colorMode: {
  58. defaultMode: 'dark',
  59. respectPrefersColorScheme: false,
  60. },
  61. navbar: {
  62. title: "",
  63. logo: {
  64. src: 'v2/img/logo.png',
  65. alt: 'WebSerial',
  66. width: 180
  67. },
  68. items: [
  69. // {
  70. // type: 'doc',
  71. // docId: 'intro',
  72. // position: 'left',
  73. // label: 'Docs',
  74. // },
  75. // {to: '/blog', label: 'Blog', position: 'left'},
  76. {
  77. href: "https://github.com/ayushsharma82/WebSerial/",
  78. position: "right",
  79. className: "header-github-link",
  80. "aria-label": "GitHub repository",
  81. },
  82. ],
  83. },
  84. footer: {
  85. style: 'light',
  86. links: [
  87. {
  88. title: 'Docs',
  89. items: [
  90. {
  91. label: 'Getting Started',
  92. to: '/getting-started',
  93. },
  94. {
  95. label: 'Examples',
  96. to: '/examples',
  97. },
  98. {
  99. label: 'Commercial License',
  100. to: '/commercial-license',
  101. },
  102. ],
  103. },
  104. {
  105. title: 'Community',
  106. items: [
  107. {
  108. label: 'Github',
  109. href: 'https://github.com/ayushsharma82/WebSerial/',
  110. },
  111. {
  112. label: 'Twitter',
  113. href: 'https://twitter.com/asrocks5',
  114. },
  115. ],
  116. },
  117. {
  118. title: 'Support',
  119. items: [
  120. {
  121. label: 'Create an Issue (Repo)',
  122. href: 'https://github.com/ayushsharma82/WebSerial/issues',
  123. },
  124. {
  125. label: 'Contact me',
  126. href: 'https://webserial.pro/support',
  127. },
  128. ],
  129. },
  130. ],
  131. copyright: `Copyright © ${new Date().getFullYear()} SOFTT. All rights reserved.`,
  132. },
  133. prism: {
  134. theme: lightCodeTheme,
  135. darkTheme: darkCodeTheme,
  136. },
  137. }),
  138. };
  139. module.exports = config;