Skip to content

Commit 2c78375

Browse files
committed
refactor(gitbook): reconstruct the document structure
1 parent f639745 commit 2c78375

23 files changed

+409
-0
lines changed

gitbook/docs/en/.gitbook.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root: ./
2+
3+
structure:
4+
readme: README.md
5+
summary: SUMMARY.md

gitbook/docs/zh-CN/.gitbook.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root: ./
2+
3+
structure:
4+
readme: README.md
5+
summary: SUMMARY.md

gitbook/docs/zh-CN/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
icon: hand-wave
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: false
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Welcome
20+
21+
Welcome to the GitBook starter template! Here you'll get an overview of all the amazing features GitBook offers to help you build beautiful, interactive documentation.
22+
23+
You'll see some of the best parts of GitBook in action — and find help on how you can turn this template into your own.
24+
25+
### Jump right in
26+
27+
<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-bolt">:bolt:</i></h4></td><td><strong>Quickstart</strong></td><td>Create your first site</td><td></td><td></td><td><a href="getting-started/quickstart.md">quickstart.md</a></td></tr><tr><td><h4><i class="fa-leaf">:leaf:</i></h4></td><td><strong>Editor basics</strong></td><td>Learn the basics of GitBook</td><td></td><td></td><td><a href="https://github.com/GitbookIO/gitbook-templates/blob/main/product-docs/broken-reference/README.md">https://github.com/GitbookIO/gitbook-templates/blob/main/product-docs/broken-reference/README.md</a></td></tr><tr><td><h4><i class="fa-globe-pointer">:globe-pointer:</i></h4></td><td><strong>Publish your docs</strong></td><td>Share your docs online</td><td></td><td></td><td><a href="getting-started/publish-your-docs.md">publish-your-docs.md</a></td></tr></tbody></table>

gitbook/docs/zh-CN/SUMMARY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Table of contents
2+
3+
* [Welcome](README.md)
4+
5+
## Getting Started
6+
7+
* [Quickstart](getting-started/quickstart.md)
8+
* [Publish your docs](getting-started/publish-your-docs.md)
9+
10+
## Basics
11+
12+
* [Editor](basics/editor.md)
13+
* [Markdown](basics/markdown.md)
14+
* [Images & media](basics/images-and-media.md)
15+
* [Interactive blocks](basics/interactive-blocks.md)
16+
* [Integrations](basics/integrations.md)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
icon: pen-to-square
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: true
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Editor
20+
21+
GitBook has a powerful block-based editor that allows you to seamlessly create, update, and enhance your content.
22+
23+
<figure><img src="https://gitbookio.github.io/onboarding-template-images/editor-hero.png" alt=""><figcaption></figcaption></figure>
24+
25+
### Writing content
26+
27+
GitBook offers a range of block types for you to add to your content inline — from simple text and tables, to code blocks and more. These elements will make your pages more useful to readers, and offer extra information and context.
28+
29+
Either start typing below, or press `/` to see a list of the blocks you can insert into your page.
30+
31+
### Add a new block
32+
33+
{% stepper %}
34+
{% step %}
35+
#### Open the insert block menu
36+
37+
Press `/` on your keyboard to open the insert block menu.
38+
{% endstep %}
39+
40+
{% step %}
41+
#### Search for the block you need
42+
43+
Try searching for “Stepper”, for exampe, to insert the stepper block.
44+
{% endstep %}
45+
46+
{% step %}
47+
#### Insert and edit your block
48+
49+
Click or press Enter to insert your block. From here, you’ll be able to edit it as needed.
50+
{% endstep %}
51+
{% endstepper %}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
icon: image-landscape
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: true
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Images & media
20+
21+
GitBook allows you to add images and media easily to your docs. Simply drag a file into the editor, or use the file manager in the upper right corner to upload multiple images at once.
22+
23+
<figure><img src="https://gitbookio.github.io/onboarding-template-images/images-hero.png" alt=""><figcaption><p>Add alt text and captions to your images</p></figcaption></figure>
24+
25+
{% hint style="info" %}
26+
You can also add images simply by copying and pasting them directly into the editor — and GitBook will automatically add it to your file manager.
27+
{% endhint %}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
icon: plug-circle-plus
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: true
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Integrations
20+
21+
GitBook integrations allow you to connect your GitBook spaces to some of your favorite platforms and services. You can install integrations into your GitBook page from the _Integrations_ menu in the top left.
22+
23+
<figure><img src="https://gitbookio.github.io/onboarding-template-images/integrations-hero.png" alt=""><figcaption></figcaption></figure>
24+
25+
### Types of integrations
26+
27+
<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Analytics</strong></td><td>Track analytics from your docs</td><td><a href="https://www.gitbook.com/integrations#analytics">https://www.gitbook.com/integrations#analytics</a></td><td></td><td></td></tr><tr><td><strong>Support</strong></td><td>Add support widgets to your docs</td><td><a href="https://www.gitbook.com/integrations#support">https://www.gitbook.com/integrations#support</a></td><td></td><td></td></tr><tr><td><strong>Interactive</strong></td><td>Add extra functionality to your docs</td><td><a href="https://www.gitbook.com/integrations#interactive">https://www.gitbook.com/integrations#interactive</a></td><td></td><td></td></tr><tr><td><strong>Visitor Authentication</strong></td><td>Protect your docs and require sign-in</td><td><a href="https://www.gitbook.com/integrations#visitor-authentication">https://www.gitbook.com/integrations#visitor-authentication</a></td><td></td><td></td></tr></tbody></table>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
icon: hand-pointer
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: true
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Interactive blocks
20+
21+
In addition to the default Markdown you can write, GitBook has a number of out-of-the-box interactive blocks you can use. You can find interactive blocks by pressing `/` from within the editor.
22+
23+
<figure><img src="https://gitbookio.github.io/onboarding-template-images/interactive-hero.png" alt=""><figcaption></figcaption></figure>
24+
25+
### Tabs
26+
27+
{% tabs %}
28+
{% tab title="First tab" %}
29+
Each tab is like a mini page — it can contain multiple other blocks, of any type. So you can add code blocks, images, integration blocks and more to individual tabs in the same tab block.
30+
{% endtab %}
31+
32+
{% tab title="Second tab" %}
33+
Add images, embedded content, code blocks, and more.
34+
35+
```javascript
36+
const handleFetchEvent = async (request, context) => {
37+
return new Response({message: "Hello World"});
38+
};
39+
```
40+
{% endtab %}
41+
{% endtabs %}
42+
43+
### Expandable sections
44+
45+
<details>
46+
47+
<summary>Click me to expand</summary>
48+
49+
Expandable blocks are helpful in condensing what could otherwise be a lengthy paragraph. They are also great in step-by-step guides and FAQs.
50+
51+
</details>
52+
53+
### Embedded content
54+
55+
{% embed url="https://www.youtube.com/watch?v=YILlrDYzAm4" %}
56+
57+
{% hint style="info" %}
58+
GitBook supports thousands of embedded websites out-of-the-box, simply by pasting their links. Feel free to check out which ones[ are supported natively](https://iframely.com).
59+
{% endhint %}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
icon: markdown
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: true
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Markdown
20+
21+
GitBook supports many different types of content, and is backed by Markdown — meaning you can copy and paste any existing Markdown files directly into the editor!
22+
23+
<figure><img src="https://gitbookio.github.io/onboarding-template-images/markdown-hero.png" alt=""><figcaption></figcaption></figure>
24+
25+
Feel free to test it out and copy the Markdown below by hovering over the code block in the upper right, and pasting into a new line underneath.
26+
27+
```markdown
28+
# Heading
29+
30+
This is some paragraph text, with a [link](https://docs.gitbook.com) to our docs.
31+
32+
## Heading 2
33+
- Point 1
34+
- Point 2
35+
- Point 3
36+
```
37+
38+
{% hint style="info" %}
39+
If you have multiple files, GitBook makes it easy to import full repositories too — allowing you to keep your GitBook content in sync.
40+
{% endhint %}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
icon: globe-pointer
3+
layout:
4+
width: default
5+
title:
6+
visible: true
7+
description:
8+
visible: true
9+
tableOfContents:
10+
visible: true
11+
outline:
12+
visible: true
13+
pagination:
14+
visible: true
15+
metadata:
16+
visible: true
17+
---
18+
19+
# Publish your docs
20+
21+
Once you’ve finished writing, editing, or importing your content, you can publish your work to the web as a docs site. Once published, your site will be accessible online only to your selected audience.
22+
23+
You can publish your site and find related settings from your docs site's homepage.
24+
25+
<figure><img src="https://gitbookio.github.io/onboarding-template-images/publish-hero.png" alt=""><figcaption></figcaption></figure>

0 commit comments

Comments
 (0)