Skip to content

Commit 70a4db2

Browse files
First commit of docusaurus website
1 parent 80b9d4b commit 70a4db2

26 files changed

+45109
-100
lines changed

.gitignore

+16-100
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,20 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
1+
# Dependencies
2+
/node_modules
493

50-
# Optional npm cache directory
51-
.npm
4+
# Production
5+
/build
526

53-
# Optional eslint cache
54-
.eslintcache
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
5510

56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
6117

62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

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)