Skip to content

Commit 6a0c0b9

Browse files
committed
first commit.
1 parent e65f0cf commit 6a0c0b9

40 files changed

+1464
-2
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

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# docs
2-
flutter-webrtc community project docs.
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://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 opens 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**](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!
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Flutter WebRTC - API",
3+
"position": 2
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Manage Docs Versions
6+
7+
Docusaurus can manage multiple versions of your docs.
8+
9+
## Create a docs version
10+
11+
Release a version 1.0 of your project:
12+
13+
```bash
14+
npm run docusaurus docs:version 1.0
15+
```
16+
17+
The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created.
18+
19+
Your docs now have 2 versions:
20+
21+
- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs
22+
- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs**
23+
24+
## Add a Version Dropdown
25+
26+
To navigate seamlessly across versions, add a version dropdown.
27+
28+
Modify the `docusaurus.config.js` file:
29+
30+
```js title="docusaurus.config.js"
31+
module.exports = {
32+
themeConfig: {
33+
navbar: {
34+
items: [
35+
// highlight-start
36+
{
37+
type: 'docsVersionDropdown',
38+
},
39+
// highlight-end
40+
],
41+
},
42+
},
43+
};
44+
```
45+
46+
The docs version dropdown appears in your navbar:
47+
48+
![Docs Version Dropdown](/img/tutorial/docsVersionDropdown.png)
49+
50+
## Update an existing version
51+
52+
It is possible to edit versioned docs in their respective folder:
53+
54+
- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`
55+
- `docs/hello.md` updates `http://localhost:3000/docs/next/hello`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Translate your site
6+
7+
Let's translate `docs/intro.md` to French.
8+
9+
## Configure i18n
10+
11+
Modify `docusaurus.config.js` to add support for the `fr` locale:
12+
13+
```js title="docusaurus.config.js"
14+
module.exports = {
15+
i18n: {
16+
defaultLocale: 'en',
17+
locales: ['en', 'fr'],
18+
},
19+
};
20+
```
21+
22+
## Translate a doc
23+
24+
Copy the `docs/intro.md` file to the `i18n/fr` folder:
25+
26+
```bash
27+
mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/
28+
29+
cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md
30+
```
31+
32+
Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French.
33+
34+
## Start your localized site
35+
36+
Start your site on the French locale:
37+
38+
```bash
39+
npm run start -- --locale fr
40+
```
41+
42+
Your localized site is accessible at `http://localhost:3000/fr/` and the `Getting Started` page is translated.
43+
44+
:::caution
45+
46+
In development, you can only use one locale at a same time.
47+
48+
:::
49+
50+
## Add a Locale Dropdown
51+
52+
To navigate seamlessly across languages, add a locale dropdown.
53+
54+
Modify the `docusaurus.config.js` file:
55+
56+
```js title="docusaurus.config.js"
57+
module.exports = {
58+
themeConfig: {
59+
navbar: {
60+
items: [
61+
// highlight-start
62+
{
63+
type: 'localeDropdown',
64+
},
65+
// highlight-end
66+
],
67+
},
68+
},
69+
};
70+
```
71+
72+
The locale dropdown now appears in your navbar:
73+
74+
![Locale Dropdown](/img/tutorial/localeDropdown.png)
75+
76+
## Build your localized site
77+
78+
Build your site for a specific locale:
79+
80+
```bash
81+
npm run build -- --locale fr
82+
```
83+
84+
Or build your site to include all the locales at once:
85+
86+
```bash
87+
npm run build
88+
```

docs/docs.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Flutter Webrtc Docs
6+
7+
Let's discover **Docusaurus in less than 5 minutes**.
8+
9+
## Getting Started
10+
11+
Get started by **creating a new site**.

docs/intro.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
sidebar_position: 2
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`.

0 commit comments

Comments
 (0)