Skip to content

Commit feb4b89

Browse files
JintzoQingWei-Li
Jintzo
authored andcommitted
Update docs: Getting started (#85)
* fixed look of links in blockquote * updated main README * updated getting started * updated more-pages * make custom sidebar loading clear * updated custom navbar * added markdown comments * updated cover documentation * updated cover page * updated sidebar
1 parent 83d7862 commit feb4b89

8 files changed

+76
-64
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
- [CLI](https://github.com/QingWei-Li/docsify-cli)
2020

2121
## Features
22-
- Not build static html files
22+
23+
- No statically built html files
2324
- Simple and lightweight (~14kB gzipped)
2425
- Smart full-text search plugin
2526
- Multiple themes
@@ -29,9 +30,9 @@
2930
## Quick start
3031
Create a `index.html`.
3132

32-
index.html
33-
3433
```html
34+
<!-- index.html -->
35+
3536
<!DOCTYPE html>
3637
<html>
3738
<head>
@@ -47,10 +48,10 @@ index.html
4748

4849
## Browser Support
4950

50-
Modern browsers and Internet Explorer 9+.
51+
Modern browsers and Internet Explorer 10+.
5152

5253
## Showcase
53-
These open-source projects are using docsify to generate their sites. Pull requests welcome : )
54+
These open-source projects are using docsify to generate their sites. Pull requests welcome :blush:
5455

5556
- [Snipaste](https://docs.snipaste.com/) - Snip & Paste
5657
- [puck](https://puck.zz173.com/) - A small & magical php framework.
@@ -69,7 +70,7 @@ These open-source projects are using docsify to generate their sites. Pull reque
6970
- Create your feature branch: `git checkout -b my-new-feature`
7071
- Commit your changes: `git commit -am 'Add some feature'`
7172
- Push to the branch: `git push origin my-new-feature`
72-
- Submit a pull request :D
73+
- Submit a pull request
7374

7475

7576
## Development

docs/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
55
## What is it
66

7-
docsify generates your documentation website on the fly. Unlike GitBook, it does not generate static html files. It smartly loads and parses your Markdown files and displays them in website. All you need to do is create an `index.html` to start and [deploy it on GitHub Pages](/deploy).
7+
docsify generates your documentation website on the fly. Unlike GitBook, it does not generate static html files. Instead, it smartly loads and parses your Markdown files and displays them as website. All you need to do is create an `index.html` to start and [deploy it on GitHub Pages](/deploy).
88

99
See the [Quick start](/quickstart) for more details.
1010

1111
## Features
1212

13-
- Not build static html files
13+
- No statically built html files
1414
- Simple and lightweight (~14kB gzipped)
1515
- Smart full-text search plugin
1616
- Multiple themes
@@ -19,9 +19,9 @@ See the [Quick start](/quickstart) for more details.
1919

2020
## Examples
2121

22-
Check out the [Showcase](https://github.com/QingWei-Li/docsify/#showcase) to see use the docsify generated website.
22+
Check out the [Showcase](https://github.com/QingWei-Li/docsify/#showcase) to docsify in use.
2323

2424
## Donate
2525

26-
If you think docsify is helpful to you or that my work is valuable. I am happy if you can help me [buy a cup of coffee](https://github.com/QingWei-Li/donate). :heart:
26+
Please consider donating if you think docsify is helpful to you or that my work is valuable. I am happy if you can help me [buy a cup of coffee](https://github.com/QingWei-Li/donate). :heart:
2727

docs/_coverpage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
> A magical documentation site generator.
66
77
- Simple and lightweight (~14kB gzipped)
8-
- Not build static html files
8+
- No statically built html files
99
- Multiple themes
1010

1111

docs/_sidebar.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
- [Themes](/themes)
1010
- [Using plugins](/plugins)
1111
- [Markdown configuration](/markdown)
12-
- [Lanuage highlight](/language-highlight)
12+
- [Lanuage highlighting](/language-highlight)
1313

1414
- Guide
1515
- [Deploy](/deploy)
16-
- [Doc helper](/helpers)
17-
- [Compatible Vue](/vue)
16+
- [Helpers](/helpers)
17+
- [Vue compatibility](/vue)
1818
- [CDN](/cdn)
1919

2020
- [Changelog](/changelog)

docs/cover.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Cover
22

3-
Activate the cover feature by setting `coverpage`. The detail in [Configuration#coverpage](configuration#coverpage).
3+
Activate the cover feature by setting `coverpage` to **true**. Details are available in the [coverpage configuration paragraph](configuration#coverpage).
44

55
## Basic usage
66

7-
Set `coverpage` to **true**, and create a `_coverpage.md`. You can see the effect in current website.
8-
9-
10-
*index.html*
7+
Set `coverpage` to **true**, and create a `_coverpage.md`:
118

129
```html
10+
<!-- index.html -->
11+
1312
<script>
1413
window.$docsify = {
1514
coverpage: true
@@ -18,33 +17,34 @@ Set `coverpage` to **true**, and create a `_coverpage.md`. You can see the effec
1817
<script src="//unpkg.com/docsify"></script>
1918
```
2019

21-
*_coverpage.md*
2220

2321
```markdown
22+
<!-- _coverpage.md -->
23+
2424
![logo](_media/icon.svg)
2525

26-
# docsify
26+
# docsify <small>3.0</small>
2727

2828
> A magical documentation site generator.
2929

30-
- Simple and lightweight (~12kb gzipped)
30+
- Simple and lightweight (~14kB gzipped)
31+
- No statically built html files
3132
- Multiple themes
32-
- Not build static html files
3333

3434

3535
[GitHub](https://github.com/QingWei-Li/docsify/)
36-
[Get Started](#quick-start)
36+
[Get Started](#docsify)
3737
```
3838

3939
!> A document site can have only one cover page.
4040

4141
## Custom background
4242

43-
The background color is generated randomly by default. You can customize the background color or image.
44-
45-
*_coverpage.md*
43+
The background color is generated randomly by default. You can customize the background color or image:
4644

4745
```markdown
46+
<!-- _coverpage.md -->
47+
4848
# docsify
4949

5050
[GitHub](https://github.com/QingWei-Li/docsify/)

docs/custom-navbar.md

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Custom navbar
22

3-
You can create navbar in HTML file. But note that the link begins with `#/`.
3+
## HTML
44

5-
*index.html*
5+
If you need custom navigation, you can create a HTML-based navigation bar (but note that documentation links begin with `#/`).
66

77
```html
8+
<!-- index.html -->
9+
810
<body>
911
<nav>
1012
<a href="#/">EN</a>
@@ -14,14 +16,13 @@ You can create navbar in HTML file. But note that the link begins with `#/`.
1416
</body>
1517
```
1618

17-
## Writing by Markdown
18-
19-
You can custom navbar by Markdown file. Set the `loadNavbar` to **true** and create a `_navbar.md`. The detail in [Configuration#load-navbar](configuration#load-navbar).
20-
21-
*index.html*
19+
## Markdown
2220

21+
Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`. Detaile are available in the [load-navbar configuration paragraph](configuration#load-navbar).
2322

2423
```html
24+
<!-- index.html -->
25+
2526
<script>
2627
window.$docsify = {
2728
loadNavbar: true
@@ -30,21 +31,25 @@ You can custom navbar by Markdown file. Set the `loadNavbar` to **true** and cre
3031
<script src="//unpkg.com/docsify"></script>
3132
```
3233

33-
*_navbar.md*
34-
3534

3635
```markdown
36+
<!-- _navbar.md -->
37+
3738
- [En](/)
3839
- [chinese](/zh-cn/)
3940
```
4041

41-
`_navbar.md` is loaded from each level directory. If this directory doesn't have `_navbar.md`, it will fallback to parent directory. For example, the current path is `/guide/quick-start`, the `_navbar.md` will be loaded from `/guide/_navbar.md`.
42+
!> You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
43+
44+
`_navbar.md` is loaded from each level directory. If the current directory doesn't have `_navbar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_navbar.md` will be loaded from `/guide/_navbar.md`.
4245

4346
## Nesting
4447

4548
You can create sub-lists by indenting items that are under a certain parent.
4649

4750
```markdown
51+
<!-- _navbar.md -->
52+
4853
- Getting started
4954
- [Quick start](/quickstart)
5055
- [Writing more pages](/more-pages)
@@ -59,7 +64,7 @@ You can create sub-lists by indenting items that are under a certain parent.
5964
- [Lanuage highlight](/language-highlight)
6065
```
6166

62-
Example.
67+
renders as
6368

6469
![Nesting navbar](_images/nested-navbar.png "Nesting navbar")
6570

docs/more-pages.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# More pages
22

3-
If you need more pages multi-level routing site. It is easy to achieve in docsify. A simple example: If you create a `guide.md`, then get the route is `/#/guide`.
3+
If you need more pages, you can simply create more markdown files in your docsify directory. If you create a file named `guide.md`, then it is accessible via `/#/guide`.
44

55
For example, the directory structure is as follows:
66

7-
87
```text
98
-| docs/
109
-| README.md
@@ -26,11 +25,13 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide
2625

2726
## Custom sidebar
2827

29-
By default, the TOC in sidebar is automatically generated based on Markdown file. You can create a Table of Contents page to list down pages in your site.
28+
By default, the table of contents in the sidebar is automatically generated based on your markdown files. If you need a custom sidebar, then you can create your own `sidebar.md` (see [this documentation's sidebar](https://github.com/QingWei-Li/docsify/blob/master/docs/_sidebar.md) for an example):
3029

31-
First, you need to set `loadSidebar` to **true**. The detail in [Configuration#load-sidebar](configuration#load-sidebar).
30+
First, you need to set `loadSidebar` to **true**. Details are available in the [configuration paragraph](configuration#load-sidebar).
3231

3332
```html
33+
<!-- index.html -->
34+
3435
<script>
3536
window.$docsify = {
3637
loadSidebar: true
@@ -39,28 +40,31 @@ First, you need to set `loadSidebar` to **true**. The detail in [Configuration#l
3940
<script src="//unpkg.com/docsify"></script>
4041
```
4142

42-
Create the `_sidebar.md`
43+
Create the `_sidebar.md`:
4344

4445
```markdown
46+
<!-- docs/_sidebar.md -->
47+
4548
- [Home](/)
4649
- [Guide](/guide)
4750
```
4851

49-
!> Need create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
52+
!> You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
5053

51-
`_sidebar.md` is loaded from each level directory. If this directory doesn't have `_sidebar.md`, it will fallback to parent directory. For example, the current path is `/guide/quick-start`, the `_sidebar.md` will be loaded from `/guide/_sidebar.md`.
54+
`_sidebar.md` is loaded from each level directory. If the current directory doesn't have `_sidebar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_sidebar.md` will be loaded from `/guide/_sidebar.md`.
5255

5356
## Table of Contents
5457

55-
Custom sidebar can also be automatically generate TOC by setting `subMaxLevel`. The detail in [Configuration#sub-max-level](configuration#sub-max-level).
58+
A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`. Details are available in the [max-level configuration paragraph](configuration#sub-max-level).
5659

5760
```html
61+
<!-- index.html -->
62+
5863
<script>
5964
window.$docsify = {
6065
loadSidebar: true,
6166
subMaxLevel: 2
6267
}
6368
</script>
6469
<script src="//unpkg.com/docsify"></script>
65-
```
66-
70+
```

docs/quickstart.md

+18-16
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Quick start
22

3-
Recommended install `docsify-cli` globally, which can help us to initialize and preview the website locally.
3+
It is recommended to install `docsify-cli` globally, which helps initializing and previewing the website locally.
44

55
```bash
66
npm i docsify-cli -g
77
```
88

9-
## initialize
9+
## Initialize
1010

11-
If you want to write the documentation in `./docs` directory, you can use the `init` command.
11+
If you want to write the documentation in the `./docs` directory, you can use the `init` command.
1212

1313
```bash
1414
docsify init ./docs
@@ -21,28 +21,28 @@ After the init is complete, you can see the file list in the docs directory.
2121

2222
- `index.html` as the entry file
2323
- `README.md` as the home page
24-
- `.nojekyll` can prevent GitHub Pages from ignoring files that begin with an underscore
24+
- `.nojekyll` prevents GitHub Pages from ignoring files that begin with an underscore
2525

2626
You can easily update the documentation in `docs/README.md`, of course you can add [more pages](more-pages).
2727

2828
## Preview your site
2929

30-
Run the local server via `docsify serve`. You can preview your site in browser via http://localhost:3000.
30+
Run the local server with `docsify serve`. You can preview your site in your browser on `http://localhost:3000`.
3131

3232

3333
```bash
3434
docsify serve docs
3535
```
3636

37-
?> More usages of reference [docsify-cli documentation](https://github.com/QingWei-Li/docsify-cli).
37+
?> For more use cases of `docsify-cli`, head over to the [docsify-cli documentation](https://github.com/QingWei-Li/docsify-cli).
3838

39-
## Manually
39+
## Manual initialization
4040

41-
If you don't like npm or feel the trouble to install the tool. What we need is an `index.html`.
42-
43-
*index.html*
41+
If you don't like npm or have trouble installing the tool, you can manually create `index.html`:
4442

4543
```html
44+
<!-- index.html -->
45+
4646
<!DOCTYPE html>
4747
<html>
4848
<head>
@@ -56,25 +56,27 @@ If you don't like npm or feel the trouble to install the tool. What we need is a
5656
</html>
5757
```
5858

59-
If your system has Python, you can easily to run a static server to preview your site.
59+
If you installed python on your system, you can easily use it to run a static server to preview your site.
6060

6161
```bash
6262
cd docs && python -m SimpleHTTPServer 3000
6363
```
6464

65-
## Loading tip
65+
## Loading dialog
6666

67-
Show `Loading...` Before starting rendering. You can customize the content.
67+
If you want, you can show a loading dialog before docsify starts to render your documentation:
6868

69-
*index.html*
7069
```html
70+
<!-- index.html -->
71+
7172
<div id="app">Please wait...</div>
7273
```
7374

74-
You should set the `data-app` attribute if you changed `el`.
75+
You should set the `data-app` attribute if you changed `el`:
7576

76-
*index.html*
7777
```html
78+
<!-- index.html -->
79+
7880
<div data-app id="main">Please wait...</div>
7981

8082
<script>

0 commit comments

Comments
 (0)