Skip to content

Commit 52c5210

Browse files
committed
Scaffolding
1 parent 04ce0b7 commit 52c5210

25 files changed

+15043
-2
lines changed

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
# yarn
19+
.pnp.*
20+
.yarn/*
21+
!.yarn/releases
22+
!.yarn/plugins
23+
!.yarn/sdks
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*

.yarn/releases/yarn-berry.js

+55
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarnPath: ".yarn/releases/yarn-berry.js"

README.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# docs
2-
All documentation for polkadot-js repos (WIP, to replace per-repo specifics)
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/doc1.md

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

docs/doc2.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: doc2
3+
title: Document Number 2
4+
---
5+
6+
This is a link to [another document.](doc3.md) This is a link to an [external page.](http://www.example.com/)

docs/doc3.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: doc3
3+
title: This is Document Number 3
4+
---
5+
6+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
7+
8+
Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum, eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique.
9+
10+
Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante, malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat. Sed posuere odio a elit cursus sagittis.
11+
12+
Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur. Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non rhoncus eu, gravida in risus. Nullam id iaculis tortor.
13+
14+
Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl. Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur.

docs/mdx.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: mdx
3+
title: Powered by MDX
4+
---
5+
6+
You can write JSX and use React components within your Markdown thanks to [MDX](https://mdxjs.com/).
7+
8+
export const Highlight = ({children, color}) => ( <span style={{
9+
backgroundColor: color,
10+
borderRadius: '2px',
11+
color: '#fff',
12+
padding: '0.2rem',
13+
}}>{children}</span> );
14+
15+
<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">Facebook blue</Highlight> are my favorite colors.
16+
17+
I can write **Markdown** alongside my _JSX_!

0 commit comments

Comments
 (0)