Skip to content

Show different config documents for different releases #17879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@ prime/
# Make evidence files
/.make_evidence

# Manpage
# Manpage and docs
/man
/docs/.hugo_build.lock
2 changes: 1 addition & 1 deletion docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ params:
description: Git with a cup of tea
author: The Gitea Authors
website: https://docs.gitea.io
# TODO: when a major release comes, the document `doc/config-cheat-sheet-dev.*.md` should also be changed accordingly.
version: 1.15.7
minGoVersion: 1.16
goVersion: 1.17
minNodeVersion: 12.17

outputs:
home:
Expand Down
13 changes: 13 additions & 0 deletions docs/content/doc/config.en-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
date: "2021-12-01T16:00:00+00:00"
title: "Config"
slug: "config"
weight: 15
toc: false
draft: false
menu:
sidebar:
name: "Config"
weight: 15
identifier: "config"
---
1,034 changes: 1,034 additions & 0 deletions docs/content/doc/config/config-cheat-sheet-1.15.en-us.md

Large diffs are not rendered by default.

406 changes: 406 additions & 0 deletions docs/content/doc/config/config-cheat-sheet-1.15.zh-cn.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
---
date: "2016-12-26T16:00:00+02:00"
title: "Config Cheat Sheet"
slug: "config-cheat-sheet"
weight: 20
title: "Config Cheat Sheet (dev)"
slug: "config-cheat-sheet-dev"
weight: 116
toc: false
draft: false
menu:
sidebar:
parent: "advanced"
name: "Config Cheat Sheet"
weight: 20
identifier: "config-cheat-sheet"
parent: "config"
name: "Config Cheat Sheet (dev)"
weight: 116
identifier: "config-cheat-sheet-dev"
---

# Configuration Cheat Sheet
# Configuration Cheat Sheet (dev)


## Notice

**This document is for the latest development branch, some setting options differ between releases.**
**If you are using a stable release, please refer to its related documents.**

This is a cheat sheet for the Gitea configuration file. It contains most of the settings
that can be configured as well as their default values.
Expand All @@ -23,9 +29,9 @@ or any corresponding location. When installing from a distribution, this will
typically be found at `/etc/gitea/conf/app.ini`.

The defaults provided here are best-effort (not built automatically). They are
accurately recorded in [app.example.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini)
(s/main/\<tag|release\>). Any string in the format `%(X)s` is a feature powered
by [ini](https://github.com/go-ini/ini/#recursive-values), for reading values recursively.
accurately recorded in [app.example.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini).
Any string in the format `%(X)s` is a feature powered by [ini](https://github.com/go-ini/ini/#recursive-values),
for reading values recursively.

Values containing `#` or `;` must be quoted using `` ` `` or `"""`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
---
date: "2016-12-26T16:00:00+02:00"
title: "配置说明"
slug: "config-cheat-sheet"
weight: 20
title: "配置说明 (dev)"
slug: "config-cheat-sheet-dev"
weight: 116
toc: false
draft: false
menu:
sidebar:
parent: "advanced"
name: "配置说明"
weight: 20
identifier: "config-cheat-sheet"
parent: "config"
name: "配置说明 (dev)"
weight: 116
identifier: "config-cheat-sheet-dev"
---

# 配置说明
# 配置说明 (dev)

这是针对Gitea配置文件的说明,你可以了解Gitea的强大配置。需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) 查看到。如果你发现 `%(X)s` 这样的内容,请查看 [ini](https://github.com/go-ini/ini/#recursive-values) 这里的说明。标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。
## 提示

**本文档仅适用于最新的开发中的分支,有些配置项在不同的发行版里是不一样的。**
**如果你正在使用一个稳定的发行版,请参考与其版本对应的文档。**

这是针对Gitea配置文件的说明,你可以了解Gitea的强大配置。需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。
所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) 查看到。
如果你发现 `%(X)s` 这样的内容,请查看 [ini](https://github.com/go-ini/ini/#recursive-values) 这里的说明。
标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。

{{< toc >}}

Expand Down
7 changes: 3 additions & 4 deletions docs/content/doc/developers/hacking-on-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ You should [install go](https://golang.org/doc/install) and set up your go
environment correctly.

Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
required to build the JavaScript and CSS files. The minimum supported Node.js
version is {{< min-node-version >}} and the latest LTS version is recommended.
required to build the JavaScript and CSS files. The latest LTS version is recommended.

**Note**: When executing make tasks that require external tools, like
`make misspell-check`, Gitea will automatically download and build these as
Expand Down Expand Up @@ -242,8 +241,8 @@ OpenAPI 3 documentation.
When creating new configuration options, it is not enough to add them to the
`modules/setting` files. You should add information to `custom/conf/app.ini`
and to the
<a href='{{< relref "doc/advanced/config-cheat-sheet.en-us.md" >}}'>configuration cheat sheet</a>
found in `docs/content/doc/advanced/config-cheat-sheet.en-us.md`
<a href='{{< relref "doc/config/config-cheat-sheet-dev.en-us.md" >}}'>configuration cheat sheet</a>
found in `docs/content/doc/config/config-cheat-sheet-*.en-us.md`

### Changing the logo

Expand Down
9 changes: 4 additions & 5 deletions docs/content/doc/installation/from-source.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ environment variable and to add the go bin directory or directories
[GOPATH](https://github.com/golang/go/wiki/GOPATH).

Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
required to build the JavaScript and CSS files. The minimum supported Node.js
version is {{< min-node-version >}} and the latest LTS version is recommended.
required to build the JavaScript and CSS files. The latest LTS version is recommended.

**Note**: When executing make tasks that require external tools, like
`make misspell-check`, Gitea will automatically download and build these as
Expand Down Expand Up @@ -85,8 +84,8 @@ git checkout v{{< version >}} # or git checkout pr-xyz

To build from source, the following programs must be present on the system:

- `go` {{< min-go-version >}} or higher, see [here](https://golang.org/dl/)
- `node` {{< min-node-version >}} or higher with `npm`, see [here](https://nodejs.org/en/download/)
- `go`, {{< min-go-version >}} or higher, see [here](https://golang.org/dl/)
- `node`, the latest LTS version or higher with `npm`, see [here](https://nodejs.org/en/download/)
- `make`, see <a href='{{< relref "doc/developers/hacking-on-gitea.en-us.md" >}}#installing-make'>here</a>

Various [make tasks](https://github.com/go-gitea/gitea/blob/main/Makefile)
Expand Down Expand Up @@ -124,7 +123,7 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build
The `build` target is split into two sub-targets:

- `make backend` which requires [Go {{< min-go-version >}}](https://golang.org/dl/) or greater.
- `make frontend` which requires [Node.js {{< min-node-version >}}](https://nodejs.org/en/download/) or greater.
- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater.

If pre-built frontend files are present it is possible to only build the backend:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/installation/from-source.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ git checkout v{{< version >}}
要从源代码进行编译,以下依赖程序必须事先安装好:

- `go` {{< min-go-version >}} 或以上版本, 详见 [here](https://golang.org/dl/)
- `node` {{< min-node-version >}} 或以上版本,并且安装 `npm`, 详见 [here](https://nodejs.org/en/download/)
- `node` LTS 或以上版本,并且安装 `npm`, 详见 [here](https://nodejs.org/en/download/)
- `make`, 详见 <a href='{{< relref "make.zh-cn.md" >}}'>这里</a>

各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/master/Makefile)
Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/usage/email-setup.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Restart Gitea for the configuration changes to take effect.

To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration.

For the full list of options check the [Config Cheat Sheet]({{< relref "doc/advanced/config-cheat-sheet.en-us.md" >}})
For the full list of options check the [Config Cheat Sheet]({{< relref "doc/config/config-cheat-sheet-dev.en-us.md" >}})

Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
- STARTTLS (also known as Opportunistic TLS) via port 587. Initial connection is done over cleartext, but then be upgraded over TLS if the server supports it.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/usage/linked-references.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Sometimes a commit or pull request may fix or bring back a problem documented
in a particular issue. Gitea supports closing and reopening the referenced
issues by preceding the reference with a particular _keyword_. Common keywords
include "closes", "fixes", "reopens", etc. This list can be
[customized]({{< ref "/doc/advanced/config-cheat-sheet.en-us.md" >}}) by the
[customized]({{< ref "doc/config/config-cheat-sheet-dev.en-us.md" >}}) by the
site administrator.

Example:
Expand Down
1 change: 0 additions & 1 deletion docs/layouts/shortcodes/min-node-version.html

This file was deleted.

1 change: 1 addition & 0 deletions docs/static/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ https://gitea-docs.netlify.com/* https://docs.gitea.io/:splat 302!
/en-us/ci-cd/ /en-us/integrations/ 302!
/en-us/third-party-tools/ /en-us/integrations/ 302!
/en-us/make/ /en-us/hacking-on-gitea/ 302!
/en-us/config-cheat-sheet/ /en-us/config-cheat-sheet-dev/ 302!