diff options
author | BetaCat <outman99@hotmail.com> | 2018-10-18 02:19:04 +0800 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-10-17 14:19:04 -0400 |
commit | 1972383216643dcb01499011f3632a16f3d81611 (patch) | |
tree | d50a99724a07571cc00a3f5f8589fca07946fb60 /docs/content | |
parent | 25def0a808da5130074a5e2334a0a9f88ed621d8 (diff) | |
download | gitea-1972383216643dcb01499011f3632a16f3d81611.tar.gz gitea-1972383216643dcb01499011f3632a16f3d81611.zip |
ZH-CN translation of Usage part (#5086)v1.6.0-rc1v1.6.0-dev
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/doc/usage.zh-cn.md | 13 | ||||
-rw-r--r-- | docs/content/doc/usage/backup-and-restore.zh-cn.md | 2 | ||||
-rw-r--r-- | docs/content/doc/usage/issue-pull-request-templates.zh-cn.md | 37 | ||||
-rw-r--r-- | docs/content/doc/usage/pull-request.zh-cn.md | 31 | ||||
-rw-r--r-- | docs/content/doc/usage/reverse-proxies.en-us.md | 2 | ||||
-rw-r--r-- | docs/content/doc/usage/reverse-proxies.zh-cn.md | 105 |
6 files changed, 188 insertions, 2 deletions
diff --git a/docs/content/doc/usage.zh-cn.md b/docs/content/doc/usage.zh-cn.md new file mode 100644 index 0000000000..c533df6624 --- /dev/null +++ b/docs/content/doc/usage.zh-cn.md @@ -0,0 +1,13 @@ +--- +date: "2016-12-27T16:00:00+02:00" +title: "使用指南" +slug: "usage" +weight: 35 +toc: false +draft: false +menu: + sidebar: + name: "使用指南" + weight: 35 + identifier: "usage" +--- diff --git a/docs/content/doc/usage/backup-and-restore.zh-cn.md b/docs/content/doc/usage/backup-and-restore.zh-cn.md index 8797d57724..17e6ae2741 100644 --- a/docs/content/doc/usage/backup-and-restore.zh-cn.md +++ b/docs/content/doc/usage/backup-and-restore.zh-cn.md @@ -1,6 +1,6 @@ --- date: "2018-06-06T09:33:00+08:00" -title: "使用: 备份与恢复" +title: "使用:备份与恢复" slug: "backup-and-restore" weight: 11 toc: true diff --git a/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md b/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md new file mode 100644 index 0000000000..ad02b351d2 --- /dev/null +++ b/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md @@ -0,0 +1,37 @@ +--- +date: "2018-05-10T16:00:00+02:00" +title: "使用:Issue 和 Pull Request 模板" +slug: "issue-pull-request-templates" +weight: 15 +toc: true +draft: false +menu: + sidebar: + parent: "usage" + name: "Issue 和 Pull Request 模板" + weight: 15 + identifier: "issue-pull-request-templates" +--- + +# 使用 Issue 和 Pull Request 模板 + +对于一些项目,在创建 issue 或 pull request 时有一个标准的询问列表需要提交者填写。Gitea 支持添加此类模板至 repository 的主分支,以便提交者在创建 issue 或 pull request 时可以自动生成一个需要完成的表单,这么做可以减少一些前期关于 issue 抑或 pull request 细节上的沟通成本。 + +以下罗列了一些可供参考的 issue 模板: + +* ISSUE_TEMPLATE.md +* issue_template.md +* .gitea/ISSUE_TEMPLATE.md +* .gitea/issue_template.md +* .github/ISSUE_TEMPLATE.md +* .github/issue_template.md + + +以下罗列了一些可供参考的 PR 模板: + +* PULL_REQUEST_TEMPLATE.md +* pull_request_template.md +* .gitea/PULL_REQUEST_TEMPLATE.md +* .gitea/pull_request_template.md +* .github/PULL_REQUEST_TEMPLATE.md +* .github/pull_request_template.md diff --git a/docs/content/doc/usage/pull-request.zh-cn.md b/docs/content/doc/usage/pull-request.zh-cn.md new file mode 100644 index 0000000000..c1bddef1b7 --- /dev/null +++ b/docs/content/doc/usage/pull-request.zh-cn.md @@ -0,0 +1,31 @@ +--- +date: "2018-06-01T19:00:00+02:00" +title: "使用:Pull Request" +slug: "pull-request" +weight: 13 +toc: true +draft: false +menu: + sidebar: + parent: "usage" + name: "Pull Request" + weight: 13 + identifier: "pull-request" +--- + +# Pull Request + +## 在 pull requests 使用“Work In Progress”标记 + +您可以通过在一个进行中的 pull request 的标题上添加前缀 `WIP:` 或者 `[WIP]`(此处大小写敏感)来防止它被意外合并,具体的前缀设置可以在配置文件 `app.ini` 中找到: + +``` +[repository.pull-request] +WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP] +``` + +列表的第一个值将用于 helpers 程序。 + +## Pull Request 模板 + +有关 pull request 模板的更多信息请您移步 : [Issue and Pull Request templates](../issue-pull-request-templates) diff --git a/docs/content/doc/usage/reverse-proxies.en-us.md b/docs/content/doc/usage/reverse-proxies.en-us.md index b067aeb49c..bd3945a405 100644 --- a/docs/content/doc/usage/reverse-proxies.en-us.md +++ b/docs/content/doc/usage/reverse-proxies.en-us.md @@ -81,7 +81,7 @@ Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http` -## Using Caddy with a Sub-path as a reverse proxy +## Using Caddy as a reverse proxy If you want Caddy to serve your Gitea instance you can add the following server block to your Caddyfile: diff --git a/docs/content/doc/usage/reverse-proxies.zh-cn.md b/docs/content/doc/usage/reverse-proxies.zh-cn.md new file mode 100644 index 0000000000..c3f5758c16 --- /dev/null +++ b/docs/content/doc/usage/reverse-proxies.zh-cn.md @@ -0,0 +1,105 @@ +--- +date: "2018-05-22T11:00:00+00:00" +title: "使用:反向代理" +slug: "reverse-proxies" +weight: 17 +toc: true +draft: false +menu: + sidebar: + parent: "usage" + name: "反向代理" + weight: 16 + identifier: "reverse-proxies" +--- + +## 使用 Nginx 作为反向代理服务 + +如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server` 的 `http` 部分: + +``` +server { + listen 80; + server_name git.example.com; + + location / { + proxy_pass http://localhost:3000; + } +} +``` + +## 使用 Nginx 作为反向代理服务并将 Gitea 路由至一个子路径 + +如果您已经有一个域名并且想与 Gitea 共享该域名,您可以增加以下 `nginx.conf` 配置中 `server` 的 `http` 部分,为 Gitea 添加路由规则: + +``` +server { + listen 80; + server_name git.example.com; + + location /git/ { # Note: Trailing slash + proxy_pass http://localhost:3000/; # Note: Trailing slash + } +} +``` + +然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`。 + +## 使用 Apache HTTPD 作为反向代理服务 + +如果您想使用 Apache HTTPD 作为 Gitea 的反向代理服务,您可以为您的 Apache HTTPD 作如下配置(在 Ubuntu 中,配置文件通常在 `/etc/apache2/httpd.conf` 目录下): + +``` +<VirtualHost *:80> + ... + ProxyPreserveHost On + ProxyRequests off + ProxyPass / http://localhost:3000/ + ProxyPassReverse / http://localhost:3000/ +</VirtualHost> +``` + +注:必须启用以下 Apache HTTPD 组件:`proxy`, `proxy_http` + +## 使用 Apache HTTPD 作为反向代理服务并将 Gitea 路由至一个子路径 + +如果您已经有一个域名并且想与 Gitea 共享该域名,您可以增加以下配置为 Gitea 添加路由规则(在 Ubuntu 中,配置文件通常在 `/etc/apache2/httpd.conf` 目录下): + +``` +<VirtualHost *:80> + ... + <Proxy *> + Order allow,deny + Allow from all + </Proxy> + + ProxyPass /git http://localhost:3000 # Note: no trailing slash after either /git or port + ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port +</VirtualHost> +``` + +然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`。 + +注:必须启用以下 Apache HTTPD 组件:`proxy`, `proxy_http` + +## 使用 Caddy 作为反向代理服务 + +如果您想使用 Caddy 作为 Gitea 的反向代理服务,您可以在 `Caddyfile` 中添加如下配置: + +``` +git.example.com { + proxy / http://localhost:3000 +} +``` + +## 使用 Caddy 作为反向代理服务并将 Gitea 路由至一个子路径 + +如果您已经有一个域名并且想与 Gitea 共享该域名,您可以在您的 `Caddyfile` 文件中增加以下配置,为 Gitea 添加路由规则: + +``` +git.example.com { + proxy /git/ http://localhost:3000 # Note: Trailing Slash after /git/ +} +``` + +然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`。 |