Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 825d1b6

Browse files
mysteryvenBoshen
authored andcommitted
docs: add basic chinese version
1 parent a5114b8 commit 825d1b6

File tree

19 files changed

+2744
-34
lines changed

19 files changed

+2744
-34
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Suggestions and corrections are always welcome, please feel free to create an is
2323
- English `pnpm run start`
2424
- Japanese: `pnpm run start --locale ja`
2525
- Korean: `pnpm run start --locale ko`
26+
- Chinese: `pnpm run start --locale zh`

docusaurus.config.js

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const { themes } = require('prism-react-renderer');
4+
const { themes } = require("prism-react-renderer");
55
const lightCodeTheme = themes.github;
66
const darkCodeTheme = themes.dracula;
77

88
/** @type {import('@docusaurus/types').Config} */
99
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.
1818
i18n: {
19-
defaultLocale: 'en',
20-
locales: ['en', 'ja', 'ko'],
19+
defaultLocale: "en",
20+
locales: ["en", "ja", "ko", "zh"],
2121
},
2222
presets: [
2323
[
24-
'classic',
24+
"classic",
2525
/** @type {import('@docusaurus/preset-classic').Options} */
2626
({
2727
docs: {
28-
sidebarPath: require.resolve('./sidebars.js'),
28+
sidebarPath: require.resolve("./sidebars.js"),
2929
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",
3131
},
3232
blog: {
33-
blogSidebarTitle: 'Tutorials',
34-
blogSidebarCount: 'ALL',
35-
sortPosts: 'ascending',
33+
blogSidebarTitle: "Tutorials",
34+
blogSidebarCount: "ALL",
35+
sortPosts: "ascending",
3636
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",
3838
showReadingTime: true,
3939
},
4040
theme: {
41-
customCss: require.resolve('./src/css/custom.css'),
41+
customCss: require.resolve("./src/css/custom.css"),
4242
},
4343
}),
4444
],
4545
],
46-
themes: ['@vegaprotocol/docusaurus-theme-github-codeblock'],
46+
themes: ["@vegaprotocol/docusaurus-theme-github-codeblock"],
4747
themeConfig:
4848
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
4949
({
5050
metadata: [
51-
{ name: 'keywords', content: 'rust, javascript, compiler, tutorial' },
51+
{ name: "keywords", content: "rust, javascript, compiler, tutorial" },
5252
],
5353
colorMode: {
54-
defaultMode: 'dark',
54+
defaultMode: "dark",
5555
},
5656
navbar: {
57-
title: 'Home',
57+
title: "Home",
5858
items: [
5959
{
60-
type: 'doc',
61-
docId: 'intro',
62-
position: 'left',
63-
label: 'Guide',
60+
type: "doc",
61+
docId: "intro",
62+
position: "left",
63+
label: "Guide",
6464
},
65-
{ to: '/blog', label: 'Tutorials', position: 'left' },
65+
{ to: "/blog", label: "Tutorials", position: "left" },
6666
{
67-
type: 'localeDropdown',
68-
position: 'right',
67+
type: "localeDropdown",
68+
position: "right",
6969
},
7070
{
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",
7474
},
7575
],
7676
},
7777
prism: {
7878
theme: lightCodeTheme,
7979
darkTheme: darkCodeTheme,
80-
additionalLanguages: ['rust'],
80+
additionalLanguages: ["rust"],
8181
},
8282
}),
8383
};

0 commit comments

Comments
 (0)