|
1 | 1 | // @ts-check
|
2 | 2 | // Note: type annotations allow type checking and IDEs autocompletion
|
3 | 3 |
|
4 |
| -const { themes } = require('prism-react-renderer'); |
| 4 | +const { themes } = require("prism-react-renderer"); |
5 | 5 | const lightCodeTheme = themes.github;
|
6 | 6 | const darkCodeTheme = themes.dracula;
|
7 | 7 |
|
8 | 8 | /** @type {import('@docusaurus/types').Config} */
|
9 | 9 | const config = {
|
10 |
| - title: 'Write a JavaScript Parser in Rust', |
11 |
| - url: 'https://oxc-project.github.io', |
12 |
| - baseUrl: '/javascript-parser-in-rust/', |
13 |
| - onBrokenLinks: 'throw', |
14 |
| - onBrokenMarkdownLinks: 'throw', |
15 |
| - onDuplicateRoutes: 'throw', |
16 |
| - organizationName: 'oxc-project', // Usually your GitHub org/user name. |
17 |
| - projectName: 'javascript-parser-in-rust', // Usually your repo name. |
| 10 | + title: "Write a JavaScript Parser in Rust", |
| 11 | + url: "https://oxc-project.github.io", |
| 12 | + baseUrl: "/javascript-parser-in-rust/", |
| 13 | + onBrokenLinks: "throw", |
| 14 | + onBrokenMarkdownLinks: "throw", |
| 15 | + onDuplicateRoutes: "throw", |
| 16 | + organizationName: "oxc-project", // Usually your GitHub org/user name. |
| 17 | + projectName: "javascript-parser-in-rust", // Usually your repo name. |
18 | 18 | i18n: {
|
19 |
| - defaultLocale: 'en', |
20 |
| - locales: ['en', 'ja', 'ko'], |
| 19 | + defaultLocale: "en", |
| 20 | + locales: ["en", "ja", "ko", "zh"], |
21 | 21 | },
|
22 | 22 | presets: [
|
23 | 23 | [
|
24 |
| - 'classic', |
| 24 | + "classic", |
25 | 25 | /** @type {import('@docusaurus/preset-classic').Options} */
|
26 | 26 | ({
|
27 | 27 | docs: {
|
28 |
| - sidebarPath: require.resolve('./sidebars.js'), |
| 28 | + sidebarPath: require.resolve("./sidebars.js"), |
29 | 29 | editUrl:
|
30 |
| - 'https://github.com/oxc-project/javascript-parser-in-rust/tree/main', |
| 30 | + "https://github.com/oxc-project/javascript-parser-in-rust/tree/main", |
31 | 31 | },
|
32 | 32 | blog: {
|
33 |
| - blogSidebarTitle: 'Tutorials', |
34 |
| - blogSidebarCount: 'ALL', |
35 |
| - sortPosts: 'ascending', |
| 33 | + blogSidebarTitle: "Tutorials", |
| 34 | + blogSidebarCount: "ALL", |
| 35 | + sortPosts: "ascending", |
36 | 36 | editUrl:
|
37 |
| - 'https://github.com/oxc-project/javascript-parser-in-rust/tree/main', |
| 37 | + "https://github.com/oxc-project/javascript-parser-in-rust/tree/main", |
38 | 38 | showReadingTime: true,
|
39 | 39 | },
|
40 | 40 | theme: {
|
41 |
| - customCss: require.resolve('./src/css/custom.css'), |
| 41 | + customCss: require.resolve("./src/css/custom.css"), |
42 | 42 | },
|
43 | 43 | }),
|
44 | 44 | ],
|
45 | 45 | ],
|
46 |
| - themes: ['@vegaprotocol/docusaurus-theme-github-codeblock'], |
| 46 | + themes: ["@vegaprotocol/docusaurus-theme-github-codeblock"], |
47 | 47 | themeConfig:
|
48 | 48 | /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
49 | 49 | ({
|
50 | 50 | metadata: [
|
51 |
| - { name: 'keywords', content: 'rust, javascript, compiler, tutorial' }, |
| 51 | + { name: "keywords", content: "rust, javascript, compiler, tutorial" }, |
52 | 52 | ],
|
53 | 53 | colorMode: {
|
54 |
| - defaultMode: 'dark', |
| 54 | + defaultMode: "dark", |
55 | 55 | },
|
56 | 56 | navbar: {
|
57 |
| - title: 'Home', |
| 57 | + title: "Home", |
58 | 58 | items: [
|
59 | 59 | {
|
60 |
| - type: 'doc', |
61 |
| - docId: 'intro', |
62 |
| - position: 'left', |
63 |
| - label: 'Guide', |
| 60 | + type: "doc", |
| 61 | + docId: "intro", |
| 62 | + position: "left", |
| 63 | + label: "Guide", |
64 | 64 | },
|
65 |
| - { to: '/blog', label: 'Tutorials', position: 'left' }, |
| 65 | + { to: "/blog", label: "Tutorials", position: "left" }, |
66 | 66 | {
|
67 |
| - type: 'localeDropdown', |
68 |
| - position: 'right', |
| 67 | + type: "localeDropdown", |
| 68 | + position: "right", |
69 | 69 | },
|
70 | 70 | {
|
71 |
| - href: 'https://github.com/oxc-project/javascript-parser-in-rust', |
72 |
| - label: 'GitHub', |
73 |
| - position: 'right', |
| 71 | + href: "https://github.com/oxc-project/javascript-parser-in-rust", |
| 72 | + label: "GitHub", |
| 73 | + position: "right", |
74 | 74 | },
|
75 | 75 | ],
|
76 | 76 | },
|
77 | 77 | prism: {
|
78 | 78 | theme: lightCodeTheme,
|
79 | 79 | darkTheme: darkCodeTheme,
|
80 |
| - additionalLanguages: ['rust'], |
| 80 | + additionalLanguages: ["rust"], |
81 | 81 | },
|
82 | 82 | }),
|
83 | 83 | };
|
|
0 commit comments