doc(zh-cn): update all documents

This commit is contained in:
qingwei.li 2017-02-12 15:51:26 +08:00
commit a96c2b0103
24 changed files with 962 additions and 333 deletions

48
docs/zh-cn/cdn.md Normal file
View file

@ -0,0 +1,48 @@
# CDN
推荐使用 [UNPKG](//unpkg.com) —— 能及时获取到最新版。
## 获取最新版本
根据 UNPKG 的规则,不指定特定版本号时将引入最新版。
```html
<!-- 引入 css -->
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<!-- 引入 script -->
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
```
## 获取指定版本
如果你担心频繁地版本更新又可能引入未知 Bug,你也可以使用具体的版本。规则是 `//unpkg.com/docsify/VERSION/`
```html
<!-- 引入 css -->
<link rel="stylesheet" href="//unpkg.com/docsify/2.0.0/themes/vue.css">
<!-- 引入 script -->
<script src="//unpkg.com/docsify/2.0.0/lib/docsify.js"></script>
```
!> 指定 *VERSION* 为 `latest` 可以强制每次都请求最新版本。
## 压缩版
CSS 的压缩文件位于 `/lib/themes/` 目录下
```html
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
```
JS 的压缩文件是原有文件路径的基础上加 `.min`后缀
```html
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
## 其他 CDN
[jsDelivr](http://www.jsdelivr.com/projects/docsify) 也是可用的,具体用法参考其文档。