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

Commit

Permalink
docs: add basic chinese version
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteryven authored and Boshen committed Nov 12, 2023
1 parent a5114b8 commit 825d1b6
Show file tree
Hide file tree
Showing 19 changed files with 2,744 additions and 34 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ Suggestions and corrections are always welcome, please feel free to create an is
- English `pnpm run start`
- Japanese: `pnpm run start --locale ja`
- Korean: `pnpm run start --locale ko`
- Chinese: `pnpm run start --locale zh`
68 changes: 34 additions & 34 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

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

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Write a JavaScript Parser in Rust',
url: 'https://oxc-project.github.io',
baseUrl: '/javascript-parser-in-rust/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
onDuplicateRoutes: 'throw',
organizationName: 'oxc-project', // Usually your GitHub org/user name.
projectName: 'javascript-parser-in-rust', // Usually your repo name.
title: "Write a JavaScript Parser in Rust",
url: "https://oxc-project.github.io",
baseUrl: "/javascript-parser-in-rust/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
onDuplicateRoutes: "throw",
organizationName: "oxc-project", // Usually your GitHub org/user name.
projectName: "javascript-parser-in-rust", // Usually your repo name.
i18n: {
defaultLocale: 'en',
locales: ['en', 'ja', 'ko'],
defaultLocale: "en",
locales: ["en", "ja", "ko", "zh"],
},
presets: [
[
'classic',
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
'https://github.com/oxc-project/javascript-parser-in-rust/tree/main',
"https://github.com/oxc-project/javascript-parser-in-rust/tree/main",
},
blog: {
blogSidebarTitle: 'Tutorials',
blogSidebarCount: 'ALL',
sortPosts: 'ascending',
blogSidebarTitle: "Tutorials",
blogSidebarCount: "ALL",
sortPosts: "ascending",
editUrl:
'https://github.com/oxc-project/javascript-parser-in-rust/tree/main',
"https://github.com/oxc-project/javascript-parser-in-rust/tree/main",
showReadingTime: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
themes: ['@vegaprotocol/docusaurus-theme-github-codeblock'],
themes: ["@vegaprotocol/docusaurus-theme-github-codeblock"],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
metadata: [
{ name: 'keywords', content: 'rust, javascript, compiler, tutorial' },
{ name: "keywords", content: "rust, javascript, compiler, tutorial" },
],
colorMode: {
defaultMode: 'dark',
defaultMode: "dark",
},
navbar: {
title: 'Home',
title: "Home",
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Guide',
type: "doc",
docId: "intro",
position: "left",
label: "Guide",
},
{ to: '/blog', label: 'Tutorials', position: 'left' },
{ to: "/blog", label: "Tutorials", position: "left" },
{
type: 'localeDropdown',
position: 'right',
type: "localeDropdown",
position: "right",
},
{
href: 'https://github.com/oxc-project/javascript-parser-in-rust',
label: 'GitHub',
position: 'right',
href: "https://github.com/oxc-project/javascript-parser-in-rust",
label: "GitHub",
position: "right",
},
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['rust'],
additionalLanguages: ["rust"],
},
}),
};
Expand Down
Loading

0 comments on commit 825d1b6

Please sign in to comment.