Skip to content
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

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

Merged
merged 10 commits into from
Mar 23, 2023
2 changes: 1 addition & 1 deletion docs/Makefile
lunny marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ params:
repo: "https://github.com/go-gitea/gitea"
docContentPath: "docs/content"

markup:
tableOfContents:
startLevel: 1
endLevel: 9

outputs:
home:
- HTML
Expand Down
14 changes: 14 additions & 0 deletions docs/content/doc/administer.en-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Administer"
slug: "administer"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Administer"
weight: 20
collapse: true
identifier: "administer"
---
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
date: "2017-08-23T09:00:00+02:00"
title: "Avancé"
slug: "advanced"
slug: "administer"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Avancé"
weight: 40
identifier: "advanced"
weight: 20
identifier: "administer"
---
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "升级"
slug: "upgrade"
weight: 10
title: "管理"
slug: "administer"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "升级"
name: "管理"
weight: 20
identifier: "upgrade"
identifier: "administer"
---
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "進階"
slug: "advanced"
slug: "administer"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "進階"
weight: 40
identifier: "advanced"
weight: 20
identifier: "administer"
---
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "Backup and Restore"
weight: 11
identifier: "backup-and-restore"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "备份与恢复"
weight: 11
identifier: "backup-and-restore"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "備份與還原"
weight: 11
identifier: "backup-and-restore"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Embedded data extraction tool"
weight: 40
weight: 20
identifier: "cmd-embedded"
---

Expand All @@ -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/administer/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.
Expand Down Expand Up @@ -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/administer/customizing-gitea.en-us.md" >}}) for details.

The `--overwrite` flag allows any existing files in the destination directory to be overwritten.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "Command Line"
weight: 10
weight: 1
identifier: "command-line"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Config Cheat Sheet"
weight: 20
weight: 30
identifier: "config-cheat-sheet"
---

Expand Down Expand Up @@ -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/administer/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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "配置说明"
weight: 20
weight: 30
identifier: "config-cheat-sheet"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Customizing Gitea"
identifier: "customizing-gitea"
weight: 9
weight: 100
---

# Customizing Gitea
Expand Down Expand Up @@ -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/administer/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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "自定义 Gitea 配置"
weight: 9
weight: 100
identifier: "customizing-gitea"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "Email setup"
weight: 12
identifier: "email-setup"
Expand Down Expand Up @@ -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/administer/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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Environment variables"
weight: 20
weight: 10
identifier: "environment-variables"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "环境变量清单"
weight: 20
weight: 10
identifier: "environment-variables"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "External renderers"
weight: 40
weight: 60
identifier: "external-renderers"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "Fail2ban setup"
weight: 16
identifier: "fail2ban-setup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "设置 Fail2ban"
weight: 16
identifier: "fail2ban-setup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "Git LFS setup"
weight: 12
identifier: "git-lfs-setup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "HTTPS setup"
weight: 12
identifier: "https-setup"
Expand All @@ -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/administer/reverse-proxies.en-us.md" >}}).

To use Gitea's built-in HTTPS support, you must change your `app.ini` file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Logging Configuration"
weight: 55
weight: 40
identifier: "logging-configuration"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Mail templates"
weight: 45
identifier: "mail-templates"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administer"
name: "Repository indexer"
weight: 45
identifier: "repo-indexer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administer"
name: "Reverse Proxies"
weight: 16
identifier: "reverse-proxies"
Expand Down Expand Up @@ -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;
Expand Down
Loading