Skip to content

Commit ed32248

Browse files
committed
init commit of docusarus
1 parent b8fe8eb commit ed32248

26 files changed

+11033
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*.log

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:lts
2+
3+
WORKDIR /app/website
4+
5+
EXPOSE 3000 35729
6+
COPY ./docs /app/docs
7+
COPY ./website /app/website
8+
RUN yarn install
9+
10+
CMD ["yarn", "start"]

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "3"
2+
3+
services:
4+
docusaurus:
5+
build: .
6+
ports:
7+
- 3000:3000
8+
- 35729:35729
9+
volumes:
10+
- ./docs:/app/docs
11+
- ./website/blog:/app/website/blog
12+
- ./website/core:/app/website/core
13+
- ./website/i18n:/app/website/i18n
14+
- ./website/pages:/app/website/pages
15+
- ./website/static:/app/website/static
16+
- ./website/sidebars.json:/app/website/sidebars.json
17+
- ./website/siteConfig.js:/app/website/siteConfig.js
18+
working_dir: /app/website

website/.gitignore

Lines changed: 20 additions & 0 deletions
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*

website/README.md

Lines changed: 33 additions & 0 deletions
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+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
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+
```
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+
```
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.

website/babel.config.js

Lines changed: 3 additions & 0 deletions
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+
};

website/blog/2019-05-28-hola.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
id: 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
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: 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.

website/blog/2019-05-30-welcome.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
id: 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!

website/docs/doc1.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
id: doc1
3+
title: Style Guide
4+
sidebar_label: Style Guide
5+
---
6+
7+
You can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).
8+
9+
## Markdown Syntax
10+
11+
To serve as an example page when styling markdown based Docusaurus sites.
12+
13+
## Headers
14+
15+
# H1 - Create the best documentation
16+
17+
## H2 - Create the best documentation
18+
19+
### H3 - Create the best documentation
20+
21+
#### H4 - Create the best documentation
22+
23+
##### H5 - Create the best documentation
24+
25+
###### H6 - Create the best documentation
26+
27+
---
28+
29+
## Emphasis
30+
31+
Emphasis, aka italics, with *asterisks* or _underscores_.
32+
33+
Strong emphasis, aka bold, with **asterisks** or __underscores__.
34+
35+
Combined emphasis with **asterisks and _underscores_**.
36+
37+
Strikethrough uses two tildes. ~~Scratch this.~~
38+
39+
---
40+
41+
## Lists
42+
43+
1. First ordered list item
44+
1. Another item
45+
- Unordered sub-list.
46+
1. Actual numbers don't matter, just that it's a number
47+
1. Ordered sub-list
48+
1. And another item.
49+
50+
* Unordered list can use asterisks
51+
52+
- Or minuses
53+
54+
+ Or pluses
55+
56+
---
57+
58+
## Links
59+
60+
[I'm an inline-style link](https://www.google.com/)
61+
62+
[I'm an inline-style link with title](https://www.google.com/ "Google's Homepage")
63+
64+
[I'm a reference-style link][arbitrary case-insensitive reference text]
65+
66+
[You can use numbers for reference-style link definitions][1]
67+
68+
Or leave it empty and use the [link text itself].
69+
70+
URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com/ or <http://www.example.com/> and sometimes example.com (but not on GitHub, for example).
71+
72+
Some text to show that the reference links can follow later.
73+
74+
[arbitrary case-insensitive reference text]: https://www.mozilla.org/
75+
[1]: http://slashdot.org/
76+
[link text itself]: http://www.reddit.com/
77+
78+
---
79+
80+
## Images
81+
82+
Here's our logo (hover to see the title text):
83+
84+
Inline-style: ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 1')
85+
86+
Reference-style: ![alt text][logo]
87+
88+
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 2'
89+
90+
Images from any folder can be used by providing path to file. Path should be relative to markdown file.
91+
92+
![img](../static/img/logo.svg)
93+
94+
---
95+
96+
## Code
97+
98+
```javascript
99+
var s = 'JavaScript syntax highlighting';
100+
alert(s);
101+
```
102+
103+
```python
104+
s = "Python syntax highlighting"
105+
print(s)
106+
```
107+
108+
```
109+
No language indicated, so no syntax highlighting.
110+
But let's throw in a <b>tag</b>.
111+
```
112+
113+
```js {2}
114+
function highlightMe() {
115+
console.log('This line can be highlighted!');
116+
}
117+
```
118+
119+
---
120+
121+
## Tables
122+
123+
Colons can be used to align columns.
124+
125+
| Tables | Are | Cool |
126+
| ------------- | :-----------: | -----: |
127+
| col 3 is | right-aligned | \$1600 |
128+
| col 2 is | centered | \$12 |
129+
| zebra stripes | are neat | \$1 |
130+
131+
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
132+
133+
| Markdown | Less | Pretty |
134+
| -------- | --------- | ---------- |
135+
| _Still_ | `renders` | **nicely** |
136+
| 1 | 2 | 3 |
137+
138+
---
139+
140+
## Blockquotes
141+
142+
> Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.
143+
144+
Quote break.
145+
146+
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote.
147+
148+
---
149+
150+
## Inline HTML
151+
152+
<dl>
153+
<dt>Definition list</dt>
154+
<dd>Is something people use sometimes.</dd>
155+
156+
<dt>Markdown in HTML</dt>
157+
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
158+
</dl>
159+
160+
---
161+
162+
## Line Breaks
163+
164+
Here's a line for us to start with.
165+
166+
This line is separated from the one above by two newlines, so it will be a _separate paragraph_.
167+
168+
This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the _same paragraph_.
169+
170+
---
171+
172+
## Admonitions
173+
174+
:::note
175+
176+
This is a note
177+
178+
:::
179+
180+
:::tip
181+
182+
This is a tip
183+
184+
:::
185+
186+
:::important
187+
188+
This is important
189+
190+
:::
191+
192+
:::caution
193+
194+
This is a caution
195+
196+
:::
197+
198+
:::warning
199+
200+
This is a warning
201+
202+
:::

0 commit comments

Comments
 (0)