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

Commit 5d9bea0

Browse files
committed
init repo
0 parents  commit 5d9bea0

17 files changed

+8767
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ pnpm
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ pnpm start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ pnpm build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true pnpm deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> pnpm deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

blog/2022-08-10-test.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Test
3+
---

docs/intro.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
sidebar_position: 1
3+
---

docusaurus.config.js

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
// @ts-check
2+
// Note: type annotations allow type checking and IDEs autocompletion
3+
4+
const lightCodeTheme = require('prism-react-renderer/themes/github');
5+
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6+
7+
/** @type {import('@docusaurus/types').Config} */
8+
const config = {
9+
title: 'JavaScript Compiler in Rust',
10+
tagline: '',
11+
url: 'https://boshen.github.io',
12+
baseUrl: '/',
13+
onBrokenLinks: 'throw',
14+
onBrokenMarkdownLinks: 'warn',
15+
// favicon: '',
16+
17+
// GitHub pages deployment config.
18+
// If you aren't using GitHub pages, you don't need these.
19+
organizationName: 'Boshen', // Usually your GitHub org/user name.
20+
projectName: 'javascript-compiler-in-rust', // Usually your repo name.
21+
22+
// Even if you don't use internalization, you can use this field to set useful
23+
// metadata like html lang. For example, if your site is Chinese, you may want
24+
// to replace "en" with "zh-Hans".
25+
i18n: {
26+
defaultLocale: 'en',
27+
locales: ['en'],
28+
},
29+
30+
presets: [
31+
[
32+
'classic',
33+
/** @type {import('@docusaurus/preset-classic').Options} */
34+
({
35+
docs: {
36+
sidebarPath: require.resolve('./sidebars.js'),
37+
// Please change this to your repo.
38+
// Remove this to remove the "edit this page" links.
39+
// editUrl:
40+
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
41+
},
42+
blog: {
43+
showReadingTime: true,
44+
// Please change this to your repo.
45+
// Remove this to remove the "edit this page" links.
46+
// editUrl:
47+
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
48+
},
49+
theme: {
50+
customCss: require.resolve('./src/css/custom.css'),
51+
},
52+
}),
53+
],
54+
],
55+
56+
themeConfig:
57+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
58+
({
59+
navbar: {
60+
title: 'Home',
61+
// logo: {
62+
// alt: 'My Site Logo',
63+
// src: 'img/logo.svg',
64+
// },
65+
items: [
66+
{
67+
type: 'doc',
68+
docId: 'intro',
69+
position: 'left',
70+
label: 'Book',
71+
},
72+
{to: '/blog', label: 'Blog', position: 'left'},
73+
{
74+
href: 'https://github.com/Boshen/javascript-compiler-in-rust',
75+
label: 'GitHub',
76+
position: 'right',
77+
},
78+
],
79+
},
80+
// footer: {
81+
// style: 'dark',
82+
// links: [
83+
// {
84+
// title: 'Docs',
85+
// items: [
86+
// {
87+
// label: 'Tutorial',
88+
// to: '/docs/intro',
89+
// },
90+
// ],
91+
// },
92+
// {
93+
// title: 'Community',
94+
// items: [
95+
// {
96+
// label: 'Stack Overflow',
97+
// href: 'https://stackoverflow.com/questions/tagged/docusaurus',
98+
// },
99+
// {
100+
// label: 'Discord',
101+
// href: 'https://discordapp.com/invite/docusaurus',
102+
// },
103+
// {
104+
// label: 'Twitter',
105+
// href: 'https://twitter.com/docusaurus',
106+
// },
107+
// ],
108+
// },
109+
// {
110+
// title: 'More',
111+
// items: [
112+
// {
113+
// label: 'Blog',
114+
// to: '/blog',
115+
// },
116+
// {
117+
// label: 'GitHub',
118+
// href: 'https://github.com/facebook/docusaurus',
119+
// },
120+
// ],
121+
// },
122+
// ],
123+
// copyright: `Copyright © ${new Date().getFullYear()} Boshen, Inc. Built with Docusaurus.`,
124+
// },
125+
prism: {
126+
theme: lightCodeTheme,
127+
darkTheme: darkCodeTheme,
128+
},
129+
}),
130+
};
131+
132+
module.exports = config;

package.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "javascript-compiler-in-rust",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"clear": "docusaurus clear",
12+
"serve": "docusaurus serve",
13+
"write-translations": "docusaurus write-translations",
14+
"write-heading-ids": "docusaurus write-heading-ids",
15+
"typecheck": "tsc"
16+
},
17+
"dependencies": {
18+
"@docusaurus/core": "2.0.1",
19+
"@docusaurus/preset-classic": "2.0.1",
20+
"@mdx-js/react": "^1.6.22",
21+
"clsx": "^1.2.1",
22+
"prism-react-renderer": "^1.3.5",
23+
"react": "^17.0.2",
24+
"react-dom": "^17.0.2"
25+
},
26+
"devDependencies": {
27+
"@docusaurus/module-type-aliases": "2.0.1",
28+
"@tsconfig/docusaurus": "^1.0.5",
29+
"typescript": "^4.7.4"
30+
},
31+
"browserslist": {
32+
"production": [
33+
">0.5%",
34+
"not dead",
35+
"not op_mini all"
36+
],
37+
"development": [
38+
"last 1 chrome version",
39+
"last 1 firefox version",
40+
"last 1 safari version"
41+
]
42+
},
43+
"engines": {
44+
"node": ">=16.14"
45+
}
46+
}

0 commit comments

Comments
 (0)