Skip to content

Commit e8433b7

Browse files
lunnyjolheiser
andauthored
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 <[email protected]>
1 parent df41181 commit e8433b7

File tree

123 files changed

+261
-346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+261
-346
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ ifeq ($(RACE_ENABLED),true)
7777
endif
7878

7979
STORED_VERSION_FILE := VERSION
80+
HUGO_VERSION ?= 0.111.3
8081

8182
ifneq ($(DRONE_TAG),)
8283
VERSION ?= $(subst v,,$(DRONE_TAG))
@@ -817,7 +818,7 @@ release-docs: | $(DIST_DIRS) docs
817818
.PHONY: docs
818819
docs:
819820
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
820-
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; \
821+
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; \
821822
fi
822823
cd docs; make trans-copy clean build-offline;
823824

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ THEME := themes/gitea
22
PUBLIC := public
33
ARCHIVE := https://dl.gitea.com/theme/main.tar.gz
44

5-
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.82.0
5+
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.111.3
66

77
.PHONY: all
88
all: build

docs/config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ params:
2626
repo: "https://github.com/go-gitea/gitea"
2727
docContentPath: "docs/content"
2828

29+
markup:
30+
tableOfContents:
31+
startLevel: 1
32+
endLevel: 9
33+
2934
outputs:
3035
home:
3136
- HTML
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
date: "2016-12-01T16:00:00+02:00"
3+
title: "Administration"
4+
slug: "administration"
5+
weight: 30
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "Administration"
11+
weight: 20
12+
collapse: true
13+
identifier: "administration"
14+
---
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
date: "2017-08-23T09:00:00+02:00"
33
title: "Avancé"
4-
slug: "advanced"
4+
slug: "administration"
55
weight: 30
66
toc: false
77
draft: false
88
menu:
99
sidebar:
1010
name: "Avancé"
11-
weight: 40
12-
identifier: "advanced"
11+
weight: 20
12+
identifier: "administration"
1313
---
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
date: "2016-12-01T16:00:00+02:00"
3+
title: "运维"
4+
slug: "administration"
5+
weight: 30
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "运维"
11+
weight: 20
12+
identifier: "administration"
13+
---
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
date: "2016-12-01T16:00:00+02:00"
3+
title: "運維"
4+
slug: "administration"
5+
weight: 30
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "運維"
11+
weight: 20
12+
identifier: "administration"
13+
---

docs/content/doc/advanced/adding-legal-pages.en-us.md renamed to docs/content/doc/administration/adding-legal-pages.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Adding Legal Pages"
1212
identifier: "adding-legal-pages"
13-
weight: 9
13+
weight: 110
1414
---
1515

1616
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.

docs/content/doc/usage/backup-and-restore.en-us.md renamed to docs/content/doc/administration/backup-and-restore.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "Backup and Restore"
1212
weight: 11
1313
identifier: "backup-and-restore"

docs/content/doc/usage/backup-and-restore.zh-cn.md renamed to docs/content/doc/administration/backup-and-restore.zh-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "备份与恢复"
1212
weight: 11
1313
identifier: "backup-and-restore"

docs/content/doc/usage/backup-and-restore.zh-tw.md renamed to docs/content/doc/administration/backup-and-restore.zh-tw.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "備份與還原"
1212
weight: 11
1313
identifier: "backup-and-restore"

docs/content/doc/advanced/cmd-embedded.en-us.md renamed to docs/content/doc/administration/cmd-embedded.en-us.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Embedded data extraction tool"
12-
weight: 40
12+
weight: 20
1313
identifier: "cmd-embedded"
1414
---
1515

@@ -21,7 +21,7 @@ menu:
2121

2222
Gitea's executable contains all the resources required to run: templates, images, style-sheets
2323
and translations. Any of them can be overridden by placing a replacement in a matching path
24-
inside the `custom` directory (see [Customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}})).
24+
inside the `custom` directory (see [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}})).
2525

2626
To obtain a copy of the embedded resources ready for editing, the `embedded` command from the CLI
2727
can be used from the OS shell interface.
@@ -85,7 +85,7 @@ The default is the current directory.
8585
The `--custom` flag tells Gitea to extract the files directly into the `custom` directory.
8686
For this to work, the command needs to know the location of the `app.ini` configuration
8787
file (`--config`) and, depending of the configuration, be ran from the directory where
88-
Gitea normally starts. See [Customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}}) for details.
88+
Gitea normally starts. See [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) for details.
8989

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

docs/content/doc/usage/command-line.en-us.md renamed to docs/content/doc/administration/command-line.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "Command Line"
12-
weight: 10
12+
weight: 1
1313
identifier: "command-line"
1414
---
1515

docs/content/doc/advanced/config-cheat-sheet.en-us.md renamed to docs/content/doc/administration/config-cheat-sheet.en-us.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Config Cheat Sheet"
12-
weight: 20
12+
weight: 30
1313
identifier: "config-cheat-sheet"
1414
---
1515

@@ -753,7 +753,7 @@ and
753753
- `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.
754754
- `USER`: **\<empty\>**: Username of mailing user (usually the sender's e-mail address).
755755
- `PASSWD`: **\<empty\>**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password.
756-
- 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.
756+
- 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.
757757
- `ENABLE_HELO`: **true**: Enable HELO operation.
758758
- `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname.
759759
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<[email protected]\> format.

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md renamed to docs/content/doc/administration/config-cheat-sheet.zh-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "配置说明"
12-
weight: 20
12+
weight: 30
1313
identifier: "config-cheat-sheet"
1414
---
1515

docs/content/doc/advanced/customizing-gitea.en-us.md renamed to docs/content/doc/administration/customizing-gitea.en-us.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Customizing Gitea"
1212
identifier: "customizing-gitea"
13-
weight: 9
13+
weight: 100
1414
---
1515

1616
# Customizing Gitea
@@ -84,7 +84,7 @@ directory at the top of this document).
8484
Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://golang.org/pkg/html/template/),
8585
which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory.
8686

87-
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).
87+
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).
8888

8989
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
9090
shouldn't be touched without fully understanding these components.

docs/content/doc/advanced/customizing-gitea.zh-cn.md renamed to docs/content/doc/administration/customizing-gitea.zh-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "自定义 Gitea 配置"
12-
weight: 9
12+
weight: 100
1313
identifier: "customizing-gitea"
1414
---
1515

docs/content/doc/usage/email-setup.en-us.md renamed to docs/content/doc/administration/email-setup.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "Email setup"
1212
weight: 12
1313
identifier: "email-setup"
@@ -58,7 +58,7 @@ Restart Gitea for the configuration changes to take effect.
5858

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

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

6363
Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
6464

docs/content/doc/advanced/environment-variables.en-us.md renamed to docs/content/doc/administration/environment-variables.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Environment variables"
12-
weight: 20
12+
weight: 10
1313
identifier: "environment-variables"
1414
---
1515

docs/content/doc/advanced/environment-variables.zh-cn.md renamed to docs/content/doc/administration/environment-variables.zh-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "环境变量清单"
12-
weight: 20
12+
weight: 10
1313
identifier: "environment-variables"
1414
---
1515

docs/content/doc/advanced/external-renderers.en-us.md renamed to docs/content/doc/administration/external-renderers.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "External renderers"
12-
weight: 40
12+
weight: 60
1313
identifier: "external-renderers"
1414
---
1515

docs/content/doc/usage/fail2ban-setup.en-us.md renamed to docs/content/doc/administration/fail2ban-setup.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "Fail2ban setup"
1212
weight: 16
1313
identifier: "fail2ban-setup"

docs/content/doc/usage/fail2ban-setup.zh-cn.md renamed to docs/content/doc/administration/fail2ban-setup.zh-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "设置 Fail2ban"
1212
weight: 16
1313
identifier: "fail2ban-setup"

docs/content/doc/usage/git-lfs-support.en-us.md renamed to docs/content/doc/administration/git-lfs-support.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "Git LFS setup"
1212
weight: 12
1313
identifier: "git-lfs-setup"

docs/content/doc/usage/https-support.en-us.md renamed to docs/content/doc/administration/https-support.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "HTTPS setup"
1212
weight: 12
1313
identifier: "https-setup"
@@ -24,7 +24,7 @@ menu:
2424
Before you enable HTTPS, make sure that you have valid SSL/TLS certificates.
2525
You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate.
2626

27-
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" >}}).
27+
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" >}}).
2828

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

docs/content/doc/advanced/logging-documentation.en-us.md renamed to docs/content/doc/administration/logging-documentation.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Logging Configuration"
12-
weight: 55
12+
weight: 40
1313
identifier: "logging-configuration"
1414
---
1515

docs/content/doc/advanced/mail-templates.en-us.md renamed to docs/content/doc/administration/mail-templates.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Mail templates"
1212
weight: 45
1313
identifier: "mail-templates"

docs/content/doc/advanced/repo-indexer.en-us.md renamed to docs/content/doc/administration/repo-indexer.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "advanced"
10+
parent: "administration"
1111
name: "Repository indexer"
1212
weight: 45
1313
identifier: "repo-indexer"

docs/content/doc/usage/reverse-proxies.en-us.md renamed to docs/content/doc/administration/reverse-proxies.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: false
77
draft: false
88
menu:
99
sidebar:
10-
parent: "usage"
10+
parent: "administration"
1111
name: "Reverse Proxies"
1212
weight: 16
1313
identifier: "reverse-proxies"
@@ -48,7 +48,7 @@ server {
4848
server_name git.example.com;
4949
5050
# Note: Trailing slash
51-
location /git/ {
51+
location /git/ {
5252
# Note: Trailing slash
5353
proxy_pass http://localhost:3000/;
5454
proxy_set_header Host $host;

0 commit comments

Comments
 (0)