Skip to content
This repository has been archived by the owner on May 8, 2022. It is now read-only.

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxiaohei committed Apr 6, 2016
1 parent 57be807 commit 3125cb1
Show file tree
Hide file tree
Showing 13 changed files with 461 additions and 317 deletions.
700 changes: 397 additions & 303 deletions app/asset/asset.go

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion doc/source/page/en/docs/deploy/3-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ pugo deploy git --local="dest" --repo="repo" --message="commit {time}" --branch=
```bash
pugo deploy --local="dest" --repo="your-repo" --branch="gh-pages"
```


#### Warning

The strategy of `PuGo` git deployment is copying compiled files to your repository directory. It will overwrite all same-named files, and will not affect other files if not same. So sometimes you need check whether the git changes following your mind.
6 changes: 5 additions & 1 deletion doc/source/page/en/docs/deploy/4-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ pugo deploy aws-s3 --local="dest" --ak="ak" --sk="sk" --bucket="bucket" --region

In AWS S3, `--region` set the region of bucket, such as `us-east-1`.

When use cloud storage, please make sure your bucket is public. Then you can set domain alias to the bucket as static website host.
When use cloud storage, please make sure your bucket is public. Then you can set domain alias to the bucket as static website host.

#### Warning

When deploying to storage service, `PuGo` uploads compiled files to remote bucket. If there are some files in same name, overwrite them. But if not, PuGo won't change them. So after uploaded, you may need to clean some old or useless files by yourself.
20 changes: 18 additions & 2 deletions doc/source/page/en/guide/8-deploy-nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lang = "en"
template = "guide.html"
```

There are two ways to deploy `PuGo` contents to public.
There are two ways to deploy `PuGo` contents to public byself, or deploy to public cloud service such as git, Amazon Cloud via `deploy` command.

### Static Website

Expand Down Expand Up @@ -49,4 +49,20 @@ location / {
}
```

But not recommended. You must add correct `Cache-Header` to get higher experience,
But not recommended. You must add correct `Cache-Header` to get higher experience,

### Cloud

`PuGo` support [FTP](/en/docs/deploy/ftp-sftp.html), [SFTP](/en/docs/deploy/ftp-sftp.html), [Git](/en/docs/deploy/git.html), and [Storage Service](/en/docs/deploy/cloud.html).

For example, the steps of deploying to github repository, in branch **gh-pages**:

- `git clone` your repository to [dir1]. Please use `git://` or `https://username:password@repository_url.git` . (PuGo can't type in username and password when pushing now).

- `git checkout gh-pages` in [dir1]

- `pugo build --dest="dir2"`, build files to [dir2]

- `pugo deploy git --local="dir2" --repo="dir1" --branch="gh-pages"`

You can read deployment document to learn further guides.
2 changes: 1 addition & 1 deletion doc/source/page/zh/docs/1-dl-compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ go generate -x

### 注意

- `PuGo` 依赖 `fsnotify` 监听文件修改,当它并没有在 **arm** 平台充分测试.
- `PuGo` 依赖 `fsnotify` 监听文件修改,但它并没有在 **arm** 平台充分测试.
- `PuGo` 使用 `log15.v2` 打印日志,但是该库无法在 **openbsd****netbsd** 平台编译。
5 changes: 4 additions & 1 deletion doc/source/page/zh/docs/deploy/3-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ pugo deploy git --local="dest" --repo="repo" --message="commit {time}" --branch=
```bash
pugo deploy --local="dest" --repo="your-repo" --branch="gh-pages"
```


#### 注意

`PuGo` 通过 git 的部署机制是,拷贝编译好的文件到 git 项目目录。重名的文件会被替换,其他文件不会受影响。因此有事可能需要关注 git 检测出的文件差异,保证是你需要的内容修改。
6 changes: 5 additions & 1 deletion doc/source/page/zh/docs/deploy/4-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ pugo deploy aws-s3 --local="dest" --ak="ak" --sk="sk" --bucket="bucket" --region

AWS S3 还需要 `--region` 设置 bucket 所在 region,如 `us-east-1`.

使用云存储时,你需要确认 bucket 是公开的。然后你可以查询相关文档绑定域名,设置主页等。
使用云存储时,你需要确认 bucket 是公开的。然后你可以查询相关文档绑定域名,设置主页等。

#### 注意

`PuGo` 上传编译好的文件到云服务时,会将重名的文件覆盖,其他文件不会变化。因此可能你需要自己检查 bucket 中的无用文件,并自己删除。
20 changes: 18 additions & 2 deletions doc/source/page/zh/guide/8-deploy-nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lang = "zh"
template = "guide.html"
```

有两种方式部署 `PuGo` 的内容。
有两种方式直接部署 `PuGo` 的内容,或通过 `deploy` 命令部署到其他远程服务

### 纯静态网站

Expand Down Expand Up @@ -47,4 +47,20 @@ location / {
}
```

你需要配置如 `Cache-Header` 去保证更好的静态性能。
你需要配置如 `Cache-Header` 去保证更好的静态性能。

### 远程服务

`PuGo` 支持发布到 [FTP](/zh/docs/deploy/ftp-sftp.html), [SFTP](/zh/docs/deploy/ftp-sftp.html), [Git](/zh/docs/deploy/git.html), 和 [Storage Service](/zh/docs/deploy/cloud.html)

例如,如下发布到 Github 项目的 **gh-pages** 分支:

- `git clone` 项目到目录 [dir1]. 请使用 `git://``https://username:password@repository_url.git` 拉取。 (PuGo 目前无法在 push 时输入用户名和密码)

- 在目录 [dir1] 执行 `git checkout gh-pages`

- `pugo build --dest="dir2"`, 编译内容到目录 [dir2]

- `pugo deploy git --local="dir2" --repo="dir1" --branch="gh-pages"`

你可以阅读部署的相关文档了解更多。
6 changes: 5 additions & 1 deletion doc/source/post/0.10-2016-03-25.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ Read this [issue](https://github.com/go-xiaohei/pugo/issues/20) to learn details

- `Meta` data:

Now you **must** add an author in meta data. Read [guide](en/guide/create-new-site) to get the data struct of author.
Now you **must** add an author in meta data. Read [guide](en/guide/create-new-site) to get the data struct of author.

- Command `build` flag value changes:

`pugo build --theme="default"` changes to `pugo build --theme="theme/default"`. You need set full relative path to refer to theme.
2 changes: 1 addition & 1 deletion doc/theme/embed/en/docs_sidebar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="pure-menu">
<ul class="pure-menu-list doc-nav">
<li class="pure-menu-item"><a href="/en/docs" class="pure-menu-link">Documentation</a></li>
<li class="pure-menu-item"><a href="/en/docs.html" class="pure-menu-link">Documentation</a></li>
<li class="pure-menu-item"><a href="/en/docs/dl-compile.html" class="pure-menu-link">Download & Compile</a></li>
<li class="pure-menu-heading" data-li="li-1" data-prefix="en/docs/cmd">Command</li>
<li class="pure-menu-item li-1"><a href="/en/docs/cmd/build.html" class="pure-menu-link">Build</a></li>
Expand Down
2 changes: 1 addition & 1 deletion doc/theme/embed/en/guide_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<li class="pure-menu-item"><a href="/en/guide/add-comment-system.html" class="pure-menu-link">Add Comment System</a></li>
<li class="pure-menu-item"><a href="/en/guide/build-files.html" class="pure-menu-link">Build Files</a></li>
<li class="pure-menu-item"><a href="/en/guide/standalone-server.html" class="pure-menu-link">Standalone Server</a></li>
<li class="pure-menu-item"><a href="/en/guide/deploy-nginx.html" class="pure-menu-link">Deploy to Nginx</a></li>
<li class="pure-menu-item"><a href="/en/guide/deploy-nginx.html" class="pure-menu-link">Deploy</a></li>
</ul>
</div>
2 changes: 1 addition & 1 deletion doc/theme/embed/zh/docs_sidebar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="pure-menu">
<ul class="pure-menu-list doc-nav">
<li class="pure-menu-item"><a href="/zh/docs" class="pure-menu-link">文档</a></li>
<li class="pure-menu-item"><a href="/zh/docs.html" class="pure-menu-link">文档</a></li>
<li class="pure-menu-item"><a href="/zh/docs/dl-compile.html" class="pure-menu-link">下载和编译</a></li>
<li class="pure-menu-heading" data-li="li-1" data-prefix="zh/docs/cmd">命令</li>
<li class="pure-menu-item li-1"><a href="/zh/docs/cmd/build.html" class="pure-menu-link">Build</a></li>
Expand Down
2 changes: 1 addition & 1 deletion doc/theme/embed/zh/guide_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<li class="pure-menu-item"><a href="/zh/guide/add-comment-system.html" class="pure-menu-link">添加评论功能</a></li>
<li class="pure-menu-item"><a href="/zh/guide/build-files.html" class="pure-menu-link">编译站点</a></li>
<li class="pure-menu-item"><a href="/zh/guide/standalone-server.html" class="pure-menu-link">内置 HTTP 服务</a></li>
<li class="pure-menu-item"><a href="/zh/guide/deploy-nginx.html" class="pure-menu-link">部署到 Nginx</a></li>
<li class="pure-menu-item"><a href="/zh/guide/deploy-nginx.html" class="pure-menu-link">部署</a></li>
</ul>
</div>

0 comments on commit 3125cb1

Please sign in to comment.