Skip to content

Commit c6b2371

Browse files
authored
Merge branch 'develop' into patch-1
2 parents 38db43e + 1dfdace commit c6b2371

30 files changed

+348
-264
lines changed

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+45-27
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,65 @@
1-
<!-- Please use English language -->
2-
<!-- Please don't delete this template -->
1+
<!--
2+
PULL REQUEST TEMPLATE
3+
---
4+
Please use English language
5+
Please don't delete this template
6+
---
7+
Update "[ ]" to "[x]" to check a box in any list below.
8+
---
9+
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.
10+
-->
311

4-
<!-- PULL REQUEST TEMPLATE -->
5-
<!-- (Update "[ ]" to "[x]" to check a box) -->
12+
## **Summary**
613

7-
**Summary**
14+
<!--
15+
THIS IS REQUIRED! Please describe what the change does and why it should be merged.
16+
-->
817

9-
**What kind of change does this PR introduce?** (check at least one)
18+
<!--
19+
If changing the UI in any way, please provide the a **before/after** screenshot:
20+
-->
1021

11-
- [ ] Bugfix
12-
- [ ] Feature
13-
- [ ] Code style update
14-
- [ ] Refactor
15-
- [ ] Docs
16-
- [ ] Build-related changes
17-
- [ ] Repo settings
18-
- [ ] Other, please describe:
22+
## **What kind of change does this PR introduce?**
1923

20-
If changing the UI of default theme, please provide the **before/after** screenshot:
24+
<!--
25+
Copy/paste one of the following options:
26+
-->
2127

22-
**Does this PR introduce a breaking change?** (check one)
28+
<!--
29+
Bugfix
30+
Feature
31+
Code style update
32+
Refactor
33+
Docs
34+
Build-related changes
35+
Repo settings
36+
Other
37+
-->
38+
39+
<!--
40+
If you chose Other, please describe.
41+
-->
42+
43+
## **For any code change,**
44+
45+
- [ ] Related documentation has been updated if needed
46+
- [ ] Related tests have been updated or tests have been added
47+
48+
## **Does this PR introduce a breaking change?** (check one)
2349

2450
- [ ] Yes
2551
- [ ] No
2652

2753
If yes, please describe the impact and migration path for existing applications:
2854

29-
**The PR fulfills these requirements:**
55+
## **Related issue, if any:**
3056

31-
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
57+
<!-- Paste issue's link or number hashtag here. -->
3258

33-
You have tested in the following browsers: (Providing a detailed version will be better.)
59+
## **Tested in the following browsers:**
3460

3561
- [ ] Chrome
3662
- [ ] Firefox
3763
- [ ] Safari
3864
- [ ] Edge
3965
- [ ] IE
40-
41-
If adding a **new feature**, the PR's description includes:
42-
43-
- [ ] A convincing reason for adding this feature
44-
- [ ] Related documents have been updated
45-
- [ ] Related tests have been updated
46-
47-
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.

Diff for: .github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: npm run test:unit -- -ci --runInBand
3232
- name: integration tests
3333
run: npm run test:integration -- -ci --runInBand
34-
- uses: microsoft/playwright-github-action@v1.3.0
34+
- uses: microsoft/playwright-github-action@v1
3535
- name: e2e tests
3636
run: npm run test:e2e -- --ci --runInBand
3737
- name: Upload artifacts (diff output)

Diff for: SECURITY.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Security Policy
2+
3+
If you believe you have found a security vulnerability in docsify, please report it to us asap.
4+
5+
## Reporting a Vulnerability
6+
7+
**Please do not report security vulnerabilities through our public GitHub issues.**
8+
9+
Send email via :email: [email protected] to us.
10+
11+
Please include as much of the following information as possible to help us better understand the possible issue:
12+
13+
- Type of issue (e.g. cross-site scripting)
14+
- Full paths of source file(s) related to the manifestation of the issue
15+
- The location of the affected source code (tag/branch/commit or direct URL)
16+
- Any special configuration required to reproduce the issue
17+
- Step-by-step instructions to reproduce the issue
18+
- Proof-of-concept or exploit code
19+
- Impact of the issue, including how an attacker might exploit the issue
20+
21+
This information will help us triage your report more quickly.
22+
23+
Thank you in advance.

Diff for: docs/_sidebar.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
- [Helpers](helpers.md)
2121
- [Vue compatibility](vue.md)
2222
- [CDN](cdn.md)
23-
- [Offline Mode(PWA)](pwa.md)
24-
- [Server-Side Rendering(SSR)](ssr.md)
23+
- [Offline Mode (PWA)](pwa.md)
24+
- [Server-Side Rendering (SSR)](ssr.md)
2525
- [Embed Files](embed-files.md)
2626

2727
- [Awesome docsify](awesome.md)

Diff for: docs/configuration.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ window.$docsify = {
4848
- Type: `String`
4949
- Default: `null`
5050

51-
Configure the repository url, or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
51+
Configure the repository url, or a string of `username/repo`, to add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
5252

5353
```js
5454
window.$docsify = {
@@ -260,7 +260,7 @@ window.$docsify = {
260260

261261
- Type: `String`
262262

263-
Website logo as it appears in the sidebar. You can resize it by using CSS.
263+
Website logo as it appears in the sidebar. You can resize it using CSS.
264264

265265
```js
266266
window.$docsify = {
@@ -337,7 +337,7 @@ window.$docsify = {
337337

338338
- Type: `String`
339339

340-
Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in old browser.
340+
Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in older browsers.
341341

342342
```js
343343
window.$docsify = {
@@ -367,7 +367,7 @@ window.$docsify = {
367367

368368
- type: `Boolean`
369369

370-
If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to HTML. Compare [#78](https://github.com/docsifyjs/docsify/issues/78).
370+
If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to HTML. See [#78](https://github.com/docsifyjs/docsify/issues/78).
371371

372372
```js
373373
window.$docsify = {
@@ -380,7 +380,7 @@ window.$docsify = {
380380

381381
- type: `Boolean`
382382

383-
Execute the script on the page. Only parse the first script tag([demo](themes)). If Vue is present, it is turned on by default.
383+
Execute the script on the page. Only parse the first script tag ([demo](themes)). If Vue is present, it is turned on by default.
384384

385385
```js
386386
window.$docsify = {
@@ -410,7 +410,7 @@ window.$docsify = {
410410
};
411411
```
412412

413-
?> If this options is `false` but you don't want to emojify some specific colons , [Refer this](https://github.com/docsifyjs/docsify/issues/742#issuecomment-586313143)
413+
?> If this option is `false` but you don't want to emojify some specific colons, [refer to this](https://github.com/docsifyjs/docsify/issues/742#issuecomment-586313143)
414414

415415
## mergeNavbar
416416

@@ -497,8 +497,8 @@ window.$docsify = {
497497

498498
- type: `Array`
499499

500-
When `routerMode: 'history'`, you may face the cross-origin issues, See [#1379](https://github.com/docsifyjs/docsify/issues/1379).
501-
In Markdown content, there is a simple way to solve it, see extends Markdown syntax `Cross-Origin link` in [helpers](helpers.md).
500+
When `routerMode: 'history'`, you may face cross-origin issues. See [#1379](https://github.com/docsifyjs/docsify/issues/1379).
501+
In Markdown content, there is a simple way to solve it: see extends Markdown syntax `Cross-Origin link` in [helpers](helpers.md).
502502

503503
```js
504504
window.$docsify = {
@@ -570,7 +570,7 @@ window.$docsify = {
570570

571571
- type: `Array<string>`
572572

573-
List of languages that will fallback to the default language when a page is requested and it doesn't exist for the given local.
573+
List of languages that will fallback to the default language when a page is requested and it doesn't exist for the given locale.
574574

575575
Example:
576576

@@ -615,14 +615,14 @@ window.$docsify = {
615615
};
616616
```
617617

618-
> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.
618+
> Note: The options for fallbackLanguages don't work with the `notFoundPage` options.
619619
620620
## topMargin
621621

622622
- type: `Number`
623623
- default: `0`
624624

625-
Adds a space on top when scrolling content page to reach the selected section. This is useful in case you have a _sticky-header_ layout and you want to align anchors to the end of your header.
625+
Adds a space on top when scrolling the content page to reach the selected section. This is useful in case you have a _sticky-header_ layout and you want to align anchors to the end of your header.
626626

627627
```js
628628
window.$docsify = {

Diff for: docs/cover.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cover
22

3-
Activate the cover feature by setting `coverpage` to **true**, compare [coverpage configuration](configuration.md#coverpage).
3+
Activate the cover feature by setting `coverpage` to **true**. See [coverpage configuration](configuration.md#coverpage).
44

55
## Basic usage
66

Diff for: docs/deploy.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pa
44

55
## GitHub Pages
66

7-
There're three places to populate your docs for your Github repository:
7+
There are three places to populate your docs for your GitHub repository:
88

99
- `docs/` folder
1010
- master branch
1111
- gh-pages branch
1212

13-
It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your Github Pages source in your repositories' settings page.
13+
It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your GitHub Pages source in your repository's settings page.
1414

15-
![github pages](_images/deploy-github-pages.png)
15+
![GitHub Pages](_images/deploy-github-pages.png)
1616

1717
!> You can also save files in the root directory and select `master branch`.
1818
You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch)
1919

2020
## GitLab Pages
2121

22-
If you are deploying your master branch, include `.gitlab-ci.yml` with the following script:
22+
If you are deploying your master branch, create a `.gitlab-ci.yml` with the following script:
2323

2424
?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
2525

@@ -43,9 +43,9 @@ pages:
4343

4444
!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
4545

46-
Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
46+
Using a terminal, determine and navigate to the directory for your Firebase Project. This could be `~/Projects/Docs`, etc. From there, run `firebase init` and choose `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
4747

48-
You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
48+
Your `firebase.json` file should look similar to this (I changed the deployment directory from `public` to `site`):
4949

5050
```json
5151
{
@@ -56,11 +56,11 @@ You should have your `firebase.json` file looking similar to this (I changed the
5656
}
5757
```
5858

59-
Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the base project directory.
59+
Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the root project directory.
6060

6161
## VPS
6262

63-
Try following nginx config.
63+
Use the following nginx config.
6464

6565
```nginx
6666
server {
@@ -78,21 +78,21 @@ server {
7878

7979
1. Login to your [Netlify](https://www.netlify.com/) account.
8080
2. In the [dashboard](https://app.netlify.com/) page, click **New site from Git**.
81-
3. Choose a repository where you store your docs, leave the **Build Command** area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.
81+
3. Choose a repository where you store your docs, leave the **Build Command** area blank, and fill in the Publish directory area with the directory of your `index.html`. For example, it should be docs if you populated it at `docs/index.html`.
8282

8383
### HTML5 router
8484

85-
When using the HTML5 router, you need to set up redirect rules that redirect all requests to your `index.html`, it's pretty simple when you're using Netlify, create a file named `_redirects` in the docs directory, add this snippet to the file and you're all set:
85+
When using the HTML5 router, you need to set up redirect rules that redirect all requests to your `index.html`. It's pretty simple when you're using Netlify. Just create a file named `_redirects` in the docs directory, add this snippet to the file, and you're all set:
8686

8787
```sh
8888
/* /index.html 200
8989
```
9090

91-
## ZEIT Now
91+
## Vercel
9292

93-
1. Install [Now CLI](https://zeit.co/download), `npm i -g now`
93+
1. Install [Vercel CLI](https://vercel.com/download), `npm i -g vercel`
9494
2. Change directory to your docsify website, for example `cd docs`
95-
3. Deploy with a single command, `now`
95+
3. Deploy with a single command, `vercel`
9696

9797
## AWS Amplify
9898

@@ -131,28 +131,28 @@ frontend:
131131
132132
```
133133

134-
6. Add the following Redirect rules in their displayed order. Note that the second record is a PNG image where you can change it with any image format you are using.
134+
6. Add the following Redirect rules in their displayed order. Note that the second record is a PNG image where you can change it with any image format you are using.
135135

136136
| Source address | Target address | Type |
137137
|----------------|----------------|---------------|
138138
| /<*>.md | /<*>.md | 200 (Rewrite) |
139139
| /<*>.png | /<*>.png | 200 (Rewrite) |
140-
| /<*> | /index.html | 200 (Rewrite) |
140+
| /<*> | /index.html | 200 (Rewrite) |
141141

142142

143143
## Docker
144144

145-
- Create docsify files
145+
- Create docsify files
146146

147-
You need prepare the initial files instead of making in container.
147+
You need prepare the initial files instead of making them inside the container.
148148
See the [Quickstart](https://docsify.js.org/#/quickstart) section for instructions on how to create these files manually or using [docsify-cli](https://github.com/docsifyjs/docsify-cli).
149149

150150
```sh
151151
index.html
152152
README.md
153153
```
154154

155-
- Create dockerfile
155+
- Create Dockerfile
156156

157157
```Dockerfile
158158
FROM node:latest
@@ -161,10 +161,10 @@ frontend:
161161
RUN npm install -g docsify-cli@latest
162162
EXPOSE 3000/tcp
163163
ENTRYPOINT docsify serve .
164-
164+
165165
```
166166

167-
So, current directory structure should be this:
167+
The current directory structure should be this:
168168

169169
```sh
170170
index.html
@@ -181,6 +181,6 @@ frontend:
181181
- Run docker image
182182

183183
```sh
184-
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
184+
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
185185
```
186186

Diff for: docs/embed-files.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ For example, here is an embedded Markdown file. You only need to do this:
1010
[filename](_media/example.md ':include')
1111
```
1212

13-
Then the content of `example.md` will be displayed directly here;
13+
Then the content of `example.md` will be displayed directly here:
1414

1515
[filename](_media/example.md ':include')
1616

1717
You can check the original content for [example.md](_media/example.md ':ignore').
1818

19-
Normally, this will compiled into a link, but in docsify, if you add `:include` it will be embedded.
19+
Normally, this will be compiled into a link, but in docsify, if you add `:include` it will be embedded. You can use single or double quotation marks around as you like.
2020

2121
External links can be used too - just replace the target. If you want to use a gist URL, see [Embed a gist](#embed-a-gist) section.
2222

@@ -73,6 +73,11 @@ Example:
7373

7474
If you embed the file as `iframe`, `audio` and `video`, then you may need to set the attributes of these tags.
7575

76+
?> Note, for the `audio` and `video` types, docsify adds the `controls` attribute by default. When you want add more attributes, the `controls` attribute need to be added manually if need be.
77+
```md
78+
[filename](_media/example.mp4 ':include :type=video controls width=100%')
79+
```
80+
7681
```markdown
7782
[cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px')
7883
```

0 commit comments

Comments
 (0)