Add bash/markdown highlight
This commit is contained in:
parent
2ffef062db
commit
f540e3c4fc
4 changed files with 11 additions and 9 deletions
|
|
@ -69,7 +69,7 @@ These open-source projects are using docsify to generate their sites. Pull reque
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### prepare
|
### prepare
|
||||||
```shell
|
```bash
|
||||||
npm i && npm run dev
|
npm i && npm run dev
|
||||||
open http://localhost:3000
|
open http://localhost:3000
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
### Create a project
|
### Create a project
|
||||||
First create a project, then create a `docs` folder
|
First create a project, then create a `docs` folder
|
||||||
```shell
|
```bash
|
||||||
mkdir my-project && cd my-project
|
mkdir my-project && cd my-project
|
||||||
mkdir docs && cd docs
|
mkdir docs && cd docs
|
||||||
```
|
```
|
||||||
|
|
@ -41,20 +41,20 @@ Push code and activate **GitHub Pages** via your repo's settings
|
||||||
Easy to setup and preview a docs.
|
Easy to setup and preview a docs.
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
```shell
|
```bash
|
||||||
npm i docsify-cli -g
|
npm i docsify-cli -g
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
Setup a boilerplate docs
|
Setup a boilerplate docs
|
||||||
```shell
|
```bash
|
||||||
docsify init docs
|
docsify init docs
|
||||||
```
|
```
|
||||||
|
|
||||||
### Preview
|
### Preview
|
||||||
Preview and serve your docs using
|
Preview and serve your docs using
|
||||||
```shell
|
```bash
|
||||||
docsify serve docs
|
docsify serve docs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,6 @@
|
||||||
data-sidebar-toggle
|
data-sidebar-toggle
|
||||||
data-coverpage
|
data-coverpage
|
||||||
data-router></script>
|
data-router></script>
|
||||||
|
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
|
||||||
|
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
### 创建项目
|
### 创建项目
|
||||||
新建一个空项目,接着创建一个 `docs` 目录并进入到 docs 目录下
|
新建一个空项目,接着创建一个 `docs` 目录并进入到 docs 目录下
|
||||||
```shell
|
```bash
|
||||||
mkdir my-project && cd my-project
|
mkdir my-project && cd my-project
|
||||||
mkdir docs && cd docs
|
mkdir docs && cd docs
|
||||||
```
|
```
|
||||||
|
|
@ -46,20 +46,20 @@ mkdir docs && cd docs
|
||||||
方便快速创建文档目录,会读取项目的 `package.json` 里的选项作为 docsify 的配置,支持本地预览。
|
方便快速创建文档目录,会读取项目的 `package.json` 里的选项作为 docsify 的配置,支持本地预览。
|
||||||
|
|
||||||
### 安装
|
### 安装
|
||||||
```shell
|
```bash
|
||||||
npm i docsify-cli -g
|
npm i docsify-cli -g
|
||||||
```
|
```
|
||||||
|
|
||||||
### 初始化文档
|
### 初始化文档
|
||||||
|
|
||||||
默认初始化在当前目录,推荐将文档放在 `docs` 目录下
|
默认初始化在当前目录,推荐将文档放在 `docs` 目录下
|
||||||
```shell
|
```bash
|
||||||
docsify init docs
|
docsify init docs
|
||||||
```
|
```
|
||||||
|
|
||||||
### 启动本地服务
|
### 启动本地服务
|
||||||
启动一个 server 方便预览,打开 http://localhost:3000
|
启动一个 server 方便预览,打开 http://localhost:3000
|
||||||
```shell
|
```bash
|
||||||
docsify serve docs
|
docsify serve docs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue