diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 051514bcb..2483fef8f 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -20,8 +20,8 @@ - [Helpers](helpers.md) - [Vue compatibility](vue.md) - [CDN](cdn.md) - - [Offline Mode(PWA)](pwa.md) - - [Server-Side Rendering(SSR)](ssr.md) + - [Offline Mode (PWA)](pwa.md) + - [Server-Side Rendering (SSR)](ssr.md) - [Embed Files](embed-files.md) - [Awesome docsify](awesome.md) diff --git a/docs/deploy.md b/docs/deploy.md index aac87df21..4072b404b 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -4,22 +4,22 @@ Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pa ## GitHub Pages -There're three places to populate your docs for your Github repository: +There are three places to populate your docs for your GitHub repository: - `docs/` folder - master branch - gh-pages branch -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. +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. -![github pages](_images/deploy-github-pages.png) +![GitHub Pages](_images/deploy-github-pages.png) !> You can also save files in the root directory and select `master branch`. You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch) ## GitLab Pages -If you are deploying your master branch, include `.gitlab-ci.yml` with the following script: +If you are deploying your master branch, create a `.gitlab-ci.yml` with the following script: ?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop. @@ -43,9 +43,9 @@ pages: !> 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. -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. +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. -You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`): +Your `firebase.json` file should look similar to this (I changed the deployment directory from `public` to `site`): ```json { @@ -56,11 +56,11 @@ You should have your `firebase.json` file looking similar to this (I changed the } ``` -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. +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. ## VPS -Try following nginx config. +Use the following nginx config. ```nginx server { @@ -78,11 +78,11 @@ server { 1. Login to your [Netlify](https://www.netlify.com/) account. 2. In the [dashboard](https://app.netlify.com/) page, click **New site from Git**. -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`. +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`. ### HTML5 router -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: +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: ```sh /* /index.html 200 @@ -117,7 +117,7 @@ version: 0.1 frontend: phases: build: - commands: + commands: - echo "Nothing to build" artifacts: baseDirectory: /docs @@ -128,20 +128,20 @@ frontend: ``` -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. +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. | Source address | Target address | Type | |----------------|----------------|---------------| | /<*>.md | /<*>.md | 200 (Rewrite) | | /<*>.png | /<*>.png | 200 (Rewrite) | -| /<*> | /index.html | 200 (Rewrite) | +| /<*> | /index.html | 200 (Rewrite) | ## Docker -- Create docsify files +- Create docsify files - You need prepare the initial files instead of making in container. + You need prepare the initial files instead of making them inside the container. 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). ```sh @@ -149,7 +149,7 @@ frontend: README.md ``` -- Create dockerfile +- Create Dockerfile ```Dockerfile FROM node:latest @@ -158,10 +158,10 @@ frontend: RUN npm install -g docsify-cli@latest EXPOSE 3000/tcp ENTRYPOINT docsify serve . - + ``` - So, current directory structure should be this: + The current directory structure should be this: ```sh index.html @@ -178,6 +178,6 @@ frontend: - Run docker image ```sh - docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo + docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo ``` diff --git a/docs/embed-files.md b/docs/embed-files.md index 480d5fc5f..936494bcb 100644 --- a/docs/embed-files.md +++ b/docs/embed-files.md @@ -10,13 +10,13 @@ For example, here is an embedded Markdown file. You only need to do this: [filename](_media/example.md ':include') ``` -Then the content of `example.md` will be displayed directly here; +Then the content of `example.md` will be displayed directly here: [filename](_media/example.md ':include') You can check the original content for [example.md](_media/example.md ':ignore'). -Normally, this will 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. +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. 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. @@ -73,7 +73,7 @@ Example: If you embed the file as `iframe`, `audio` and `video`, then you may need to set the attributes of these tags. -?> 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. +?> 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. ```md [filename](_media/example.mp4 ':include :type=video controls width=100%') ``` diff --git a/docs/helpers.md b/docs/helpers.md index 46ff81d32..6bd8a069d 100644 --- a/docs/helpers.md +++ b/docs/helpers.md @@ -2,7 +2,7 @@ docsify extends Markdown syntax to make your documents more readable. -> Note: For the special code syntax cases, you'd better put them within a code backticks to avoid any conflicting from configurations or emojis. +> Note: For the special code syntax cases, it's better to put them within code backticks to avoid any conflict from configurations or emojis. ## Important content @@ -30,13 +30,13 @@ are rendered as: ## Ignore to compile link -Some time we will put some other relative path to the link, you have to need to tell docsify you don't need to compile this link. For example +Sometimes we will use some other relative path for the link, and we have to tell docsify that we don't need to compile this link. For example: ```md [link](/demo/) ``` -It will be compiled to `link` and will be loaded `/demo/README.md`. Maybe you want to jump to `/demo/index.html`. +It will be compiled to `link` and will load `/demo/README.md`. Maybe you want to jump to `/demo/index.html`. Now you can do that @@ -44,7 +44,7 @@ Now you can do that [link](/demo/ ':ignore') ``` -You will get `link`html. Do not worry, you can still set title for link. +You will get `link`html. Do not worry, you can still set the title for the link. ```md [link](/demo/ ':ignore title') @@ -67,13 +67,13 @@ You will get `link`html. Do not worry, you can still set ti ## Cross-Origin link -Only when you both set the `routerMode: 'history'` and `externalLinkTarget: '_self'`, you need add this configuration for those Cross-Origin links. +Only when you set both the `routerMode: 'history'` and `externalLinkTarget: '_self'`, you need to add this configuration for those Cross-Origin links. ```md [example.com](https://example.com/ ':crossorgin') ``` -## Github Task Lists +## GitHub Task Lists ```md - [ ] foo @@ -150,7 +150,7 @@ This is useful for rendering markdown content in the details element. -Or markdown content can be wrapped in html tag. +Markdown content can also be wrapped in html tags. ```markdown