Skip to content

Commit 8c18a22

Browse files
committed
feat(init): ༼ つ ◕_◕ ༽つ Entria Workshop
0 parents  commit 8c18a22

36 files changed

+11058
-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

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Entria Workshop

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://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/intro.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Tutorial Intro
6+
7+
Let's discover **Docusaurus in less than 5 minutes**.
8+
9+
## Getting Started
10+
11+
Get started by **creating a new site**.
12+
13+
Or **try Docusaurus immediately** with **[new.docusaurus.io](https://new.docusaurus.io)**.
14+
15+
## Generate a new site
16+
17+
Generate a new Docusaurus site using the **classic template**:
18+
19+
```shell
20+
npx @docusaurus/init@latest init my-website classic
21+
```
22+
23+
## Start your site
24+
25+
Run the development server:
26+
27+
```shell
28+
cd my-website
29+
30+
npx docusaurus start
31+
```
32+
33+
Your site starts at `http://localhost:3000`.
34+
35+
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and display your changes.

docs/tutorial-basics/_category_.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Tutorial - Basics",
3+
"position": 2
4+
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
5+
# Congratulations!
6+
7+
You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
8+
9+
Docusaurus has **much more to offer**!
10+
11+
Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
12+
13+
Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
14+
15+
## What's next?
16+
17+
- Read the [official documentation](https://docusaurus.io/).
18+
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
19+
- Add a [search bar](https://docusaurus.io/docs/search)
20+
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
21+
- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Create a Blog Post
6+
7+
Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
8+
9+
## Create your first Post
10+
11+
Create a file at `blog/2021-02-28-greetings.md`:
12+
13+
```md title="blog/2021-02-28-greetings.md"
14+
---
15+
slug: greetings
16+
title: Greetings!
17+
author: Steven Hansel
18+
author_title: Docusaurus Contributor
19+
author_url: https://github.com/ShinteiMai
20+
author_image_url: https://github.com/ShinteiMai.png
21+
tags: [greetings]
22+
---
23+
24+
Congratulations, you have made your first post!
25+
26+
Feel free to play around and edit this post as much you like.
27+
```
28+
29+
A new blog post is now available at `http://localhost:3000/blog/greetings`.
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Create a Document
6+
7+
Documents are **groups of pages** connected through:
8+
9+
- a **sidebar**
10+
- **previous/next navigation**
11+
- **versioning**
12+
13+
## Create your first Doc
14+
15+
Create a markdown file at `docs/hello.md`:
16+
17+
```md title="docs/hello.md"
18+
# Hello
19+
20+
This is my **first Docusaurus document**!
21+
```
22+
23+
A new document is now available at `http://localhost:3000/docs/hello`.
24+
25+
## Configure the Sidebar
26+
27+
Docusaurus automatically **creates a sidebar** from the `docs` folder.
28+
29+
Add metadatas to customize the sidebar label and position:
30+
31+
```diff title="docs/hello.md"
32+
+ ---
33+
+ sidebar_label: "Hi!"
34+
+ sidebar_position: 3
35+
+ ---
36+
37+
38+
# Hello
39+
40+
This is my **first Docusaurus document**!
41+
```
42+
43+
It is also possible to create your sidebar explicitly in `sidebars.js`:
44+
45+
```diff title="sidebars.js"
46+
module.exports = {
47+
tutorialSidebar: [
48+
{
49+
type: 'category',
50+
label: 'Tutorial',
51+
- items: [...],
52+
+ items: ['hello'],
53+
},
54+
],
55+
};
56+
```

docs/tutorial-basics/create-a-page.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Create a Page
6+
7+
Add **Markdown or React** files to `src/pages` to create a **standalone page**:
8+
9+
- `src/pages/index.js` -> `localhost:3000/`
10+
- `src/pages/foo.md` -> `localhost:3000/foo`
11+
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
12+
13+
## Create your first React Page
14+
15+
Create a file at `src/pages/my-react-page.js`:
16+
17+
```jsx title="src/pages/my-react-page.js"
18+
import React from 'react';
19+
import Layout from '@theme/Layout';
20+
21+
export default function MyReactPage() {
22+
return (
23+
<Layout>
24+
<h1>My React page</h1>
25+
<p>This is a React page</p>
26+
</Layout>
27+
);
28+
}
29+
```
30+
31+
A new page is now available at `http://localhost:3000/my-react-page`.
32+
33+
## Create your first Markdown Page
34+
35+
Create a file at `src/pages/my-markdown-page.md`:
36+
37+
```mdx title="src/pages/my-markdown-page.md"
38+
# My Markdown page
39+
40+
This is a Markdown page
41+
```
42+
43+
A new page is now available at `http://localhost:3000/my-markdown-page`.
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
# Deploy your site
6+
7+
Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**).
8+
9+
It builds your site as simple **static HTML, JavaScript and CSS files**.
10+
11+
## Build your site
12+
13+
Build your site **for production**:
14+
15+
```bash
16+
npm run build
17+
```
18+
19+
The static files are generated in the `build` folder.
20+
21+
## Deploy your site
22+
23+
Test your production build locally:
24+
25+
```bash
26+
npm run serve
27+
```
28+
29+
The `build` folder is now served at `http://localhost:3000/`.
30+
31+
You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).

0 commit comments

Comments
 (0)