doc(zh-cn): update all documents
This commit is contained in:
parent
a866744c45
commit
a96c2b0103
24 changed files with 962 additions and 333 deletions
34
docs/zh-cn/deploy.md
Normal file
34
docs/zh-cn/deploy.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# 部署
|
||||
|
||||
和 GitBook 生成的文档一样,我们可以直接把文档网站部署到 GitHub Pages 或者 VPS 上。
|
||||
|
||||
## 部署 GitHub Pages
|
||||
|
||||
GitHub Pages 支持从三个地方读取文件
|
||||
- `docs/` 目录
|
||||
- master 分支
|
||||
- gh-pages 分支
|
||||
|
||||
我们推荐直接将文档放在 `docs/` 目录下,在设置页面开启 **GitHub Pages** 功能并选择 `master branch /docs folder` 选项。
|
||||
|
||||

|
||||
|
||||
!> 你可以将文档放在根目录下,然后选择 **master 分支** 作为文档目录。
|
||||
|
||||
## 部署 VPS
|
||||
|
||||
和部署所有静态网站一样,将服务器的访问根目录设定为 `index.html` 文件。
|
||||
|
||||
例如 nginx 的配置
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name your.domain.com;
|
||||
|
||||
location / {
|
||||
alias /path/to/dir/of/docs;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue