Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629)

- **Installation**: includes how to install Gitea and related other
tools, also includes upgrade Gitea
- **Administration**: includes how to configure Gitea, customize Gitea
and manage Gitea instance out of Gitea admin UI
- **Usage**: includes how to use Gitea's functionalities. A sub
documentation is about packages, in future we could also include CI/CD
and others.
- **Development**: includes how to integrate with Gitea's API, how to
develop new features within Gitea
- **Contributing**: includes how to contribute code to Gitea
repositories.

After this is merged, I think we can have a sub-documentation of `Usage`
part named `Actions` to describe how to use Gitea actions

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
2023-03-23 23:18:24 +08:00
committed by GitHub
parent df411819eb
commit e8433b7fe6
123 changed files with 261 additions and 346 deletions

View File

@ -77,6 +77,7 @@ ifeq ($(RACE_ENABLED),true)
endif
STORED_VERSION_FILE := VERSION
HUGO_VERSION ?= 0.111.3
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
@ -817,7 +818,7 @@ release-docs: | $(DIST_DIRS) docs
.PHONY: docs
docs:
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.74.3/hugo_0.74.3_Linux-64bit.tar.gz | tar zxf - -C /tmp && mv /tmp/hugo /usr/bin/hugo && chmod +x /usr/bin/hugo; \
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mv /tmp/hugo /usr/bin/hugo && chmod +x /usr/bin/hugo; \
fi
cd docs; make trans-copy clean build-offline;

View File

@ -2,7 +2,7 @@ THEME := themes/gitea
PUBLIC := public
ARCHIVE := https://dl.gitea.com/theme/main.tar.gz
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.82.0
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.111.3
.PHONY: all
all: build

View File

@ -26,6 +26,11 @@ params:
repo: "https://github.com/go-gitea/gitea"
docContentPath: "docs/content"
markup:
tableOfContents:
startLevel: 1
endLevel: 9
outputs:
home:
- HTML

View File

@ -0,0 +1,14 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Administration"
slug: "administration"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Administration"
weight: 20
collapse: true
identifier: "administration"
---

View File

@ -1,13 +1,13 @@
---
date: "2017-08-23T09:00:00+02:00"
title: "Avancé"
slug: "advanced"
slug: "administration"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Avancé"
weight: 40
identifier: "advanced"
weight: 20
identifier: "administration"
---

View File

@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "运维"
slug: "administration"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "运维"
weight: 20
identifier: "administration"
---

View File

@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "運維"
slug: "administration"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "運維"
weight: 20
identifier: "administration"
---

View File

@ -7,10 +7,10 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Adding Legal Pages"
identifier: "adding-legal-pages"
weight: 9
weight: 110
---
Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Policy) to be added to website. Follow these steps to add them to your Gitea instance.

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "Backup and Restore"
weight: 11
identifier: "backup-and-restore"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "备份与恢复"
weight: 11
identifier: "backup-and-restore"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "備份與還原"
weight: 11
identifier: "backup-and-restore"

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Embedded data extraction tool"
weight: 40
weight: 20
identifier: "cmd-embedded"
---
@ -21,7 +21,7 @@ menu:
Gitea's executable contains all the resources required to run: templates, images, style-sheets
and translations. Any of them can be overridden by placing a replacement in a matching path
inside the `custom` directory (see [Customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}})).
inside the `custom` directory (see [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}})).
To obtain a copy of the embedded resources ready for editing, the `embedded` command from the CLI
can be used from the OS shell interface.
@ -85,7 +85,7 @@ The default is the current directory.
The `--custom` flag tells Gitea to extract the files directly into the `custom` directory.
For this to work, the command needs to know the location of the `app.ini` configuration
file (`--config`) and, depending of the configuration, be ran from the directory where
Gitea normally starts. See [Customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}}) for details.
Gitea normally starts. See [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) for details.
The `--overwrite` flag allows any existing files in the destination directory to be overwritten.

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "Command Line"
weight: 10
weight: 1
identifier: "command-line"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Config Cheat Sheet"
weight: 20
weight: 30
identifier: "config-cheat-sheet"
---
@ -753,7 +753,7 @@ and
- `FORCE_TRUST_SERVER_CERT`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe. Consider adding the certificate to the system trust store instead.
- `USER`: **\<empty\>**: Username of mailing user (usually the sender's e-mail address).
- `PASSWD`: **\<empty\>**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password.
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or SMTP host is localhost. See [Email Setup]({{< relref "doc/usage/email-setup.en-us.md" >}}) for more information.
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or SMTP host is localhost. See [Email Setup]({{< relref "doc/administration/email-setup.en-us.md" >}}) for more information.
- `ENABLE_HELO`: **true**: Enable HELO operation.
- `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname.
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<email@example.com\> format.

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "配置说明"
weight: 20
weight: 30
identifier: "config-cheat-sheet"
---

View File

@ -7,10 +7,10 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Customizing Gitea"
identifier: "customizing-gitea"
weight: 9
weight: 100
---
# Customizing Gitea
@ -84,7 +84,7 @@ directory at the top of this document).
Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://golang.org/pkg/html/template/),
which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory.
To obtain any embedded file (including templates), the [`gitea embedded` tool]({{< relref "doc/advanced/cmd-embedded.en-us.md" >}}) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using).
To obtain any embedded file (including templates), the [`gitea embedded` tool]({{< relref "doc/administration/cmd-embedded.en-us.md" >}}) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using).
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
shouldn't be touched without fully understanding these components.

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "自定义 Gitea 配置"
weight: 9
weight: 100
identifier: "customizing-gitea"
---

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "Email setup"
weight: 12
identifier: "email-setup"
@ -58,7 +58,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/administration/config-cheat-sheet.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:

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Environment variables"
weight: 20
weight: 10
identifier: "environment-variables"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "环境变量清单"
weight: 20
weight: 10
identifier: "environment-variables"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "External renderers"
weight: 40
weight: 60
identifier: "external-renderers"
---

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "Fail2ban setup"
weight: 16
identifier: "fail2ban-setup"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "设置 Fail2ban"
weight: 16
identifier: "fail2ban-setup"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "Git LFS setup"
weight: 12
identifier: "git-lfs-setup"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "HTTPS setup"
weight: 12
identifier: "https-setup"
@ -24,7 +24,7 @@ menu:
Before you enable HTTPS, make sure that you have valid SSL/TLS certificates.
You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate.
If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide]({{< relref "doc/usage/reverse-proxies.en-us.md" >}}).
If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}).
To use Gitea's built-in HTTPS support, you must change your `app.ini` file:

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Logging Configuration"
weight: 55
weight: 40
identifier: "logging-configuration"
---

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Mail templates"
weight: 45
identifier: "mail-templates"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Repository indexer"
weight: 45
identifier: "repo-indexer"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "Reverse Proxies"
weight: 16
identifier: "reverse-proxies"
@ -48,7 +48,7 @@ server {
server_name git.example.com;
# Note: Trailing slash
location /git/ {
location /git/ {
# Note: Trailing slash
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "反向代理"
weight: 16
identifier: "reverse-proxies"
@ -48,7 +48,7 @@ server {
server_name git.example.com;
# 注意: /git/ 最后需要有一个路径符号
location /git/ {
location /git/ {
# 注意: 反向代理后端 URL 的最后需要有一个路径符号
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;

Some files were not shown because too many files have changed in this diff Show More