Skip to content

Commit de94aa4

Browse files
committed
first commit
0 parents  commit de94aa4

29 files changed

+11214
-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*

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: node_js
2+
node_js:
3+
# - lts/*
4+
- 12
5+
cache:
6+
directories:
7+
- node_modules
8+
9+
branches:
10+
only:
11+
- master
12+
13+
before_install:
14+
- export TZ='Asia/Beijing'
15+
install:
16+
- npm install
17+
18+
script:
19+
- npm run clean
20+
- npm run build
21+
22+
after_script:
23+
- cd ./public
24+
- git init
25+
- git config user.name "zhaocchen"
26+
- git config user.email "[email protected]"
27+
- git add .
28+
- git commit -m "Travis CI Auto Builder at $(date +'%Y-%m-%d %H:%M:%S')"
29+
- git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```console
8+
yarn install
9+
```
10+
11+
## Local Development
12+
13+
```console
14+
yarn start
15+
```
16+
17+
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```console
22+
yarn 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+
```console
30+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
31+
```
32+
33+
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/2019-05-28-hola.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
slug: hola
3+
title: Hola
4+
author: Gao Wei
5+
author_title: Docusaurus Core Team
6+
author_url: https://github.com/wgao19
7+
author_image_url: https://avatars1.githubusercontent.com/u/2055384?v=4
8+
tags: [hola, docusaurus]
9+
---
10+
11+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

blog/2019-05-29-hello-world.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
slug: hello-world
3+
title: Hello
4+
author: Endilie Yacop Sucipto
5+
author_title: Maintainer of Docusaurus
6+
author_url: https://github.com/endiliey
7+
author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
8+
tags: [hello, docusaurus]
9+
---
10+
11+
Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://v2.docusaurus.io/).
12+
13+
<!--truncate-->
14+
15+
This is a test post.
16+
17+
A whole bunch of other information.

blog/2019-05-30-welcome.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
slug: welcome
3+
title: Welcome
4+
author: Yangshun Tay
5+
author_title: Front End Engineer @ Facebook
6+
author_url: https://github.com/yangshun
7+
author_image_url: https://avatars0.githubusercontent.com/u/1315101?s=400&v=4
8+
tags: [facebook, hello, docusaurus]
9+
---
10+
11+
Blog features are powered by the blog plugin. Simply add files to the `blog` directory. It supports tags as well!
12+
13+
Delete the whole directory if you don't want the blog features. As simple as that!

docs/create-a-blog-post.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Create a Blog Post
3+
---
4+
5+
This page will help you on how to create blog posts in Docusaurus.
6+
7+
## Create a Blog Post
8+
9+
Create a file at `blog/2021-02-28-greetings.md`:
10+
11+
```md title="blog/2021-02-28-greetings.md"
12+
---
13+
title: Greetings!
14+
author: Steven Hansel
15+
author_title: Docusaurus Contributor
16+
author_url: https://github.com/ShinteiMai
17+
author_image_url: https://github.com/ShinteiMai.png
18+
---
19+
20+
Congratulations, you have made your first post!
21+
22+
Feel free to play around and edit this post as much you like.
23+
```
24+
25+
A new blog post is now available at `http://localhost:3000/blog/greetings`.

docs/create-a-document.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Create a Document
3+
---
4+
5+
Documents are pages with a **sidebar**, a **previous/next navigation** and many other useful features.
6+
7+
## Create a Document
8+
9+
Create a markdown file at `docs/my-doc.md`:
10+
11+
```mdx title="docs/hello.md"
12+
---
13+
title: Hello, World!
14+
---
15+
16+
## Hello, World!
17+
18+
This is your first document in **Docusaurus**, Congratulations!
19+
```
20+
21+
A new document is now available at `http://localhost:3000/docs/hello`.
22+
23+
## Add your document to the sidebar
24+
25+
Add `hello` to the `sidebars.js` file:
26+
27+
```diff title="sidebars.js"
28+
module.exports = {
29+
docs: [
30+
{
31+
type: 'category',
32+
label: 'Docusaurus Tutorial',
33+
- items: ['getting-started', 'create-a-doc', ...],
34+
+ items: ['getting-started', 'create-a-doc', 'hello', ...],
35+
},
36+
],
37+
};
38+
```

docs/create-a-page.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Create a Page
3+
---
4+
5+
Any React or Markdown file created under `src/pages` directory is converted into a website page:
6+
7+
- `src/pages/index.js` -> `localhost:3000/`
8+
- `src/pages/foo.md` -> `localhost:3000/foo`
9+
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
10+
11+
## Create a React Page
12+
13+
Create a file at `src/pages/my-react-page.js`:
14+
15+
```jsx title="src/pages/my-react-page.js"
16+
import React from 'react';
17+
import Layout from '@theme/Layout';
18+
19+
function HelloWorld() {
20+
return (
21+
<Layout>
22+
<h1>My React page</h1>
23+
<p>This is a React page</p>
24+
</Layout>
25+
);
26+
}
27+
```
28+
29+
A new page is now available at `http://localhost:3000/my-react-page`.
30+
31+
## Create a Markdown Page
32+
33+
Create a file at `src/pages/my-markdown-page.md`:
34+
35+
```mdx title="src/pages/my-markdown-page.md"
36+
---
37+
title: My Markdown page
38+
---
39+
40+
# My Markdown page
41+
42+
This is a Markdown page
43+
```
44+
45+
A new page is now available at `http://localhost:3000/my-markdown-page`.

docs/getting-started.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Getting Started
3+
slug: /
4+
---
5+
6+
## Step 1: Generate a new Docusaurus site
7+
8+
If you haven't already, generate a new Docusaurus site using the classic template:
9+
10+
```shell
11+
npx @docusaurus/init@latest init my-website classic
12+
```
13+
14+
## Step 2: Start your Docusaurus site
15+
16+
Run the development server in the newly created `my-website` folder:
17+
18+
```shell
19+
cd my-website
20+
21+
npx docusaurus start
22+
```
23+
24+
Open `docs/getting-started.md` and edit some lines. The site reloads automatically and display your changes.
25+
26+
## That's it!
27+
28+
Congratulations! You've successfully run and modified your Docusaurus project.

0 commit comments

Comments
 (0)