|
| 1 | +import type * as Preset from '@docusaurus/preset-classic'; |
| 2 | +import type { Config } from '@docusaurus/types'; |
| 3 | + |
| 4 | +const { themes } = require('prism-react-renderer'); |
| 5 | + |
| 6 | +const lightCodeTheme = themes.github; |
| 7 | +const darkCodeTheme = themes.shadesOfPurple; |
| 8 | + |
| 9 | +const config: Config = { |
| 10 | + title: 'SOQL Parser JS', |
| 11 | + tagline: 'Parse and generate SOQL queries', |
| 12 | + url: 'https://soql-parser-js.getjetstream.app', |
| 13 | + baseUrl: '/', |
| 14 | + onBrokenLinks: 'throw', |
| 15 | + favicon: 'img/favicon.ico', |
| 16 | + |
| 17 | + markdown: { |
| 18 | + hooks: { |
| 19 | + onBrokenMarkdownImages: 'throw', |
| 20 | + onBrokenMarkdownLinks: 'throw', |
| 21 | + }, |
| 22 | + }, |
| 23 | + |
| 24 | + // GitHub pages deployment config. |
| 25 | + // If you aren't using GitHub pages, you don't need these. |
| 26 | + organizationName: 'jetstreamapp', |
| 27 | + projectName: 'soql-parser-js', |
| 28 | + deploymentBranch: 'gh-pages', |
| 29 | + trailingSlash: false, |
| 30 | + |
| 31 | + // Even if you don't use internalization, you can use this field to set useful |
| 32 | + // metadata like html lang. For example, if your site is Chinese, you may want |
| 33 | + // to replace "en" with "zh-Hans". |
| 34 | + i18n: { |
| 35 | + defaultLocale: 'en', |
| 36 | + locales: ['en'], |
| 37 | + }, |
| 38 | + |
| 39 | + presets: [ |
| 40 | + [ |
| 41 | + '@docusaurus/preset-classic', |
| 42 | + { |
| 43 | + docs: { |
| 44 | + sidebarPath: 'sidebars.ts', |
| 45 | + editUrl: 'https://github.com/jetstreamapp/soql-parser-js/docs/docs/', |
| 46 | + }, |
| 47 | + theme: { |
| 48 | + customCss: ['./src/css/custom.css'], |
| 49 | + }, |
| 50 | + }, |
| 51 | + ], |
| 52 | + ], |
| 53 | + |
| 54 | + themeConfig: { |
| 55 | + colorMode: { |
| 56 | + defaultMode: 'dark', |
| 57 | + respectPrefersColorScheme: true, |
| 58 | + }, |
| 59 | + navbar: { |
| 60 | + title: '', |
| 61 | + logo: { |
| 62 | + alt: 'Logo', |
| 63 | + src: 'img/soql-parser-js-logo.svg', |
| 64 | + }, |
| 65 | + items: [ |
| 66 | + { |
| 67 | + type: 'doc', |
| 68 | + docId: 'overview', |
| 69 | + position: 'left', |
| 70 | + label: 'Documentation', |
| 71 | + }, |
| 72 | + { to: '/playground', label: 'Playground', position: 'left' }, |
| 73 | + { |
| 74 | + href: 'https://github.com/jetstreamapp/soql-parser-js', |
| 75 | + label: 'GitHub', |
| 76 | + position: 'right', |
| 77 | + }, |
| 78 | + ], |
| 79 | + }, |
| 80 | + footer: { |
| 81 | + style: 'dark', |
| 82 | + links: [ |
| 83 | + { |
| 84 | + title: 'Links', |
| 85 | + items: [ |
| 86 | + { |
| 87 | + label: 'Documentation', |
| 88 | + to: '/docs/overview', |
| 89 | + }, |
| 90 | + { |
| 91 | + label: 'GitHub', |
| 92 | + href: 'https://github.com/jetstreamapp/soql-parser-js', |
| 93 | + }, |
| 94 | + ], |
| 95 | + }, |
| 96 | + ], |
| 97 | + }, |
| 98 | + markdown: { |
| 99 | + mdx1Compat: { |
| 100 | + comments: false, |
| 101 | + admonitions: false, |
| 102 | + headingIds: false, |
| 103 | + }, |
| 104 | + }, |
| 105 | + prism: { |
| 106 | + theme: lightCodeTheme, |
| 107 | + darkTheme: darkCodeTheme, |
| 108 | + }, |
| 109 | + additionalLanguages: ['javascript', 'json', 'sql'], |
| 110 | + } satisfies Preset.ThemeConfig, |
| 111 | +}; |
| 112 | + |
| 113 | +module.exports = config; |
0 commit comments