Merge branch 'master' into graceful-queues

This commit is contained in:
Lunny Xiao 2020-01-07 16:42:14 +08:00 committed by GitHub
commit a74b473655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 83 additions and 27 deletions

View File

@ -290,7 +290,8 @@ ENABLE_GZIP = false
ENABLE_PPROF = false
; PPROF_DATA_PATH, use an absolute path when you start gitea as service
PPROF_DATA_PATH = data/tmp/pprof
; Landing page, can be "home", "explore", or "organizations"
; Landing page, can be "home", "explore", "organizations" or "login"
; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.
LANDING_PAGE = home
; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = false

View File

@ -186,7 +186,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
- `STATIC_ROOT_PATH`: **./**: Upper level of template and static files path.
- `STATIC_CACHE_TIME`: **6h**: Web browser cache time for static resources on `custom/`, `public/` and all uploaded avatars.
- `ENABLE_GZIP`: **false**: Enables application-level GZIP support.
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore\].
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login\].
- `LFS_START_SERVER`: **false**: Enables git-lfs support.
- `LFS_CONTENT_PATH`: **./data/lfs**: Where to store LFS files.
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.

View File

@ -44,12 +44,6 @@ environment variable; this can be used to override the default path to something
**Note:** Gitea must perform a full restart to see configuration changes.
## Customizing /robots.txt
To make Gitea serve a custom `/robots.txt` (default: empty 404), create a file called
`robots.txt` in the `custom` folder (or `CustomPath`) with
[expected contents](http://www.robotstxt.org/).
## Serving custom public files
To make Gitea serve custom public files (like pages and images), use the folder

View File

@ -0,0 +1,39 @@
---
date: "2019-12-31T13:55:00+05:00"
title: "Advanced: Search Engines Indexation"
slug: "search-engines-indexation"
weight: 30
toc: true
draft: false
menu:
sidebar:
parent: "advanced"
name: "Search Engines Indexation"
weight: 60
identifier: "search-engines-indexation"
---
# Search engines indexation of your Gitea installation
By default your Gitea installation will be indexed by search engines.
If you don't want your repository to be visible for search engines read further.
## Block search engines indexation using robots.txt
To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations,
create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}})
Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt).
```txt
User-agent: *
Disallow: /
```
If you installed Gitea in a subdirectory, you will need to create or edit the `robots.txt` in the top level directory.
```txt
User-agent: *
Disallow: /gitea/
```

View File

@ -99,5 +99,10 @@ func TestSettingLandingPage(t *testing.T) {
resp = MakeRequest(t, req, http.StatusFound)
assert.Equal(t, "/explore/organizations", resp.Header().Get("Location"))
setting.LandingPageURL = setting.LandingPageLogin
req = NewRequest(t, "GET", "/")
resp = MakeRequest(t, req, http.StatusFound)
assert.Equal(t, "/user/login", resp.Header().Get("Location"))
setting.LandingPageURL = landingPage
}

View File

@ -54,6 +54,7 @@ const (
LandingPageHome LandingPage = "/"
LandingPageExplore LandingPage = "/explore"
LandingPageOrganizations LandingPage = "/explore/organizations"
LandingPageLogin LandingPage = "/user/login"
)
// enumerates all the types of captchas
@ -648,6 +649,8 @@ func NewContext() {
LandingPageURL = LandingPageExplore
case "organizations":
LandingPageURL = LandingPageOrganizations
case "login":
LandingPageURL = LandingPageLogin
default:
LandingPageURL = LandingPageHome
}

View File

@ -10,6 +10,7 @@ link_account=Account verbinden
register=Registrieren
website=Webseite
version=Version
powered_by=Powered by %s
page=Seite
template=Template
language=Sprache
@ -1053,6 +1054,7 @@ pulls.is_checking=Die Konfliktprüfung läuft noch. Bitte aktualisiere die Seite
pulls.required_status_check_failed=Einige erforderliche Prüfungen waren nicht erfolgreich.
pulls.required_status_check_administrator=Als Administrator kannst du diesen Pull-Request weiterhin zusammenführen.
pulls.blocked_by_approvals=Dieser Pull-Request hat noch nicht genügend Zustimmungen. %d von %d Zustimmungen erteilt.
pulls.blocked_by_rejection=Dieser Pull-Request hat Änderungen, die von einem offiziellen Reviewer angefragt wurden.
pulls.can_auto_merge_desc=Dieser Pull-Request kann automatisch zusammengeführt werden.
pulls.cannot_auto_merge_desc=Dieser Pull-Request kann nicht automatisch zusammengeführt werden, da es Konflikte gibt.
pulls.cannot_auto_merge_helper=Bitte manuell zusammenführen, um die Konflikte zu lösen.
@ -1416,6 +1418,8 @@ settings.update_protect_branch_success=Branch-Schutz für den Branch „%s“ wu
settings.remove_protected_branch_success=Branch-Schutz für den Branch „%s“ wurde deaktiviert.
settings.protected_branch_deletion=Branch-Schutz deaktivieren
settings.protected_branch_deletion_desc=Wenn du den Branch-Schutz deaktivierst, können alle Nutzer mit Schreibrechten auf den Branch pushen. Fortfahren?
settings.block_rejected_reviews=Merge bei abgelehnten Reviews blockieren
settings.block_rejected_reviews_desc=Mergen ist nicht möglich, wenn Änderungen durch offizielle Reviewer angefragt werden, auch wenn es genügend Zustimmungen gibt.
settings.default_branch_desc=Wähle einen Standardbranch für Pull-Requests und Code-Commits:
settings.choose_branch=Wähle einen Branch …
settings.no_protected_branch=Es gibt keine geschützten Branches.

View File

@ -1194,7 +1194,7 @@ activity.git_stats_deletion_n=%d suppressions
search=Chercher
search.search_repo=Rechercher dans le dépôt
search.results=Résulats de la recherche « %s » dans <a href="%s"> %s</a>
search.results=Résultats de la recherche « %s » dans <a href="%s"> %s</a>
settings=Paramètres
settings.desc=Les paramètres sont l'endroit où gérer les options du dépôt

View File

@ -10,6 +10,7 @@ link_account=アカウント連携
register=登録
website=Webサイト
version=バージョン
powered_by=Powered by %s
page=ページ
template=テンプレート
language=言語
@ -1053,6 +1054,7 @@ pulls.is_checking=マージのコンフリクトを確認中です。 少し待
pulls.required_status_check_failed=いくつかの必要なステータスチェックが成功していません。
pulls.required_status_check_administrator=管理者であるため、このプルリクエストをマージすることは可能です。
pulls.blocked_by_approvals=このプルリクエストはまだ承認数が足りません。 %[1]d/%[2]dの承認を得ています。
pulls.blocked_by_rejection=このプルリクエストは公式レビューアにより変更要請されています。
pulls.can_auto_merge_desc=このプルリクエストは自動的にマージできます。
pulls.cannot_auto_merge_desc=コンフリクトが存在するため、このプルリクエストは自動的にマージできません。
pulls.cannot_auto_merge_helper=コンフリクトを解消するため手動でマージしてください。
@ -1416,6 +1418,8 @@ settings.update_protect_branch_success=ブランチ '%s' の保護を更新し
settings.remove_protected_branch_success=ブランチ '%s' の保護を無効にしました。
settings.protected_branch_deletion=ブランチ保護の無効化
settings.protected_branch_deletion_desc=ブランチ保護を無効にすると、書き込み権限を持つユーザーにブランチへのプッシュを許可することになります。 続行しますか?
settings.block_rejected_reviews=不承認レビューでマージをブロック
settings.block_rejected_reviews_desc=公式レビューアが変更を要請しているときは、承認数を満たしていても、マージできないようにします。
settings.default_branch_desc=プルリクエストやコミット表示のデフォルトのブランチを選択:
settings.choose_branch=ブランチを選択…
settings.no_protected_branch=保護しているブランチはありません。

View File

@ -10,6 +10,7 @@ link_account=链接帐户
register=注册
website=官方网站
version=当前版本
powered_by=Powered by %s
page=页面
template=模板
language=语言选项
@ -959,6 +960,7 @@ issues.add_time=手动添加时间
issues.add_time_short=添加时间
issues.add_time_cancel=取消
issues.add_time_history=`添加耗时 %s`
issues.del_time_history=`已删除时间 %s`
issues.add_time_hours=小时
issues.add_time_minutes=分钟
issues.add_time_sum_to_small=没有输入时间。
@ -1052,6 +1054,7 @@ pulls.is_checking=正在进行合并冲突检测,请稍后再试。
pulls.required_status_check_failed=一些必要的检查没有成功。
pulls.required_status_check_administrator=作为管理员,您仍可合并此合并请求。
pulls.blocked_by_approvals=此合并请求没有通过审批。已获取审批数%d个共需要审批数%d个。
pulls.blocked_by_rejection=此合并请求有官方审核员请求的更改。
pulls.can_auto_merge_desc=该合并请求可以进行自动合并操作。
pulls.cannot_auto_merge_desc=该合并请求存在冲突,无法进行自动合并操作。
pulls.cannot_auto_merge_helper=手动合并解决此冲突
@ -1415,6 +1418,8 @@ settings.update_protect_branch_success=分支 "%s" 的分支保护已更新。
settings.remove_protected_branch_success=分支 "%s" 的分支保护已被禁用。
settings.protected_branch_deletion=禁用分支保护
settings.protected_branch_deletion_desc=禁用分支保护允许具有写入权限的用户推送提交到此分支。继续?
settings.block_rejected_reviews=拒绝审核阻止了此合并
settings.block_rejected_reviews_desc=如果官方审查人员要求作出改动,即使有足够的批准,合并也不允许。
settings.default_branch_desc=请选择一个默认的分支用于合并请求和提交:
settings.choose_branch=选择一个分支...
settings.no_protected_branch=没有受保护的分支
@ -2046,6 +2051,7 @@ create_pull_request=`创建了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
close_pull_request=`关闭了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
reopen_pull_request=`重新开启了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`评论了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
comment_pull=`评论了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
merge_pull_request=`合并了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
transfer_repo=将仓库 <code>%s</code> 转移至 <a href="%s">%s</a>
push_tag=推送了标签 <a href="%s/src/tag/%s">%[2]s</a> 到 <a href="%[1]s">%[3]s</a>

View File

@ -13,11 +13,11 @@ import (
api "code.gitea.io/gitea/modules/structs"
)
// GetIssueCommentReactions list reactions of a issue comment
// GetIssueCommentReactions list reactions of a comment from an issue
func GetIssueCommentReactions(ctx *context.APIContext) {
// swagger:operation GET /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueGetCommentReactions
// ---
// summary: Get a list reactions of a issue comment
// summary: Get a list of reactions from a comment of an issue
// consumes:
// - application/json
// produces:
@ -83,11 +83,11 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, result)
}
// PostIssueCommentReaction add a reaction to a comment of a issue
// PostIssueCommentReaction add a reaction to a comment of an issue
func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation POST /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issuePostCommentReaction
// ---
// summary: Add a reaction to a comment of a issue comment
// summary: Add a reaction to a comment of an issue
// consumes:
// - application/json
// produces:
@ -124,11 +124,11 @@ func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOpti
changeIssueCommentReaction(ctx, form, true)
}
// DeleteIssueCommentReaction list reactions of a issue comment
// DeleteIssueCommentReaction remove a reaction from a comment of an issue
func DeleteIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation DELETE /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueDeleteCommentReaction
// ---
// summary: Remove a reaction from a comment of a issue comment
// summary: Remove a reaction from a comment of an issue
// consumes:
// - application/json
// produces:
@ -219,11 +219,11 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp
}
}
// GetIssueReactions list reactions of a issue comment
// GetIssueReactions list reactions of an issue
func GetIssueReactions(ctx *context.APIContext) {
// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/reactions issue issueGetIssueReactions
// ---
// summary: Get a list reactions of a issue
// summary: Get a list reactions of an issue
// consumes:
// - application/json
// produces:
@ -289,11 +289,11 @@ func GetIssueReactions(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, result)
}
// PostIssueReaction add a reaction to a comment of a issue
// PostIssueReaction add a reaction to an issue
func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation POST /repos/{owner}/{repo}/issues/{index}/reactions issue issuePostIssueReaction
// ---
// summary: Add a reaction to a comment of a issue
// summary: Add a reaction to an issue
// consumes:
// - application/json
// produces:
@ -330,11 +330,11 @@ func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
changeIssueReaction(ctx, form, true)
}
// DeleteIssueReaction list reactions of a issue comment
// DeleteIssueReaction remove a reaction from an issue
func DeleteIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation DELETE /repos/{owner}/{repo}/issues/{index}/reactions issue issueDeleteIssueReaction
// ---
// summary: Remove a reaction from a comment of a issue
// summary: Remove a reaction from an issue
// consumes:
// - application/json
// produces:

View File

@ -3102,7 +3102,7 @@
"tags": [
"issue"
],
"summary": "Get a list reactions of a issue comment",
"summary": "Get a list of reactions from a comment of an issue",
"operationId": "issueGetCommentReactions",
"parameters": [
{
@ -3147,7 +3147,7 @@
"tags": [
"issue"
],
"summary": "Add a reaction to a comment of a issue comment",
"summary": "Add a reaction to a comment of an issue",
"operationId": "issuePostCommentReaction",
"parameters": [
{
@ -3202,7 +3202,7 @@
"tags": [
"issue"
],
"summary": "Remove a reaction from a comment of a issue comment",
"summary": "Remove a reaction from a comment of an issue",
"operationId": "issueDeleteCommentReaction",
"parameters": [
{
@ -3871,7 +3871,7 @@
"tags": [
"issue"
],
"summary": "Get a list reactions of a issue",
"summary": "Get a list reactions of an issue",
"operationId": "issueGetIssueReactions",
"parameters": [
{
@ -3916,7 +3916,7 @@
"tags": [
"issue"
],
"summary": "Add a reaction to a comment of a issue",
"summary": "Add a reaction to an issue",
"operationId": "issuePostIssueReaction",
"parameters": [
{
@ -3971,7 +3971,7 @@
"tags": [
"issue"
],
"summary": "Remove a reaction from a comment of a issue",
"summary": "Remove a reaction from an issue",
"operationId": "issueDeleteIssueReaction",
"parameters": [
{