Compare commits

...

10 Commits

Author SHA1 Message Date
GiteaBot
4acf0214b1 [skip ci] Updated translations via Crowdin 2023-03-24 00:16:34 +00:00
Sandro
0fd7e373c8
Fix codeblocks in the cheat sheet (#23664) 2023-03-23 16:42:22 -04:00
Jason Song
9f39def991
Drop migration for ForeignReference (#23605)
Fix
https://github.com/go-gitea/gitea/issues/21086#issuecomment-1476560381

Related to #21721
2023-03-23 15:01:55 -04:00
Hester Gong
9cefb7be73
Fix new issue/pull request btn margin when it is next to sort (#23647)
Close #23627 

Added margin left to the button when it is next to the svg, which has a
margin-right of `-0.5rem`

And here it might be better if `white-space: nowrap;` is added because
otherwise it might look like below on pull requests page on smaller
screen

<img width="945" alt="截屏2023-03-23 09 57 41"
src="https://user-images.githubusercontent.com/17645053/227079613-71c696ab-55ec-4641-acb9-622a8baebb31.png">

After:
<img width="936" alt="截屏2023-03-23 10 08 27"
src="https://user-images.githubusercontent.com/17645053/227080971-6bf2588e-40dd-4770-b0d1-45d7c63e0f48.png">

Pull Request on smaller screen
<img width="922" alt="截屏2023-03-23 10 25 16"
src="https://user-images.githubusercontent.com/17645053/227084144-0c2ed3e6-5c11-4252-bba2-b5f971b70f4a.png">
2023-03-23 14:07:04 -04:00
wxiaoguang
95818adb71
A tool to help to backport locales, changes source strings to fix other broken translations (#23633)
It use old en-US locales as reference, fill the old other locales with
new locales.

----

## More broken translations

Many translations are still broken. The reason is: at the last time
restoring the ini to crowdin, many semicolon are treated as comments.

Two kinds of broken strings:

### Some translations can be re-translated

<details>

```
skipping options/locale/locale_si-LK.ini org teams.add_nonexistent_repo
skipping options/locale/locale_tr-TR.ini repo commits.search.tooltip
skipping options/locale/locale_es-ES.ini repo settings.trust_model.committer.desc
skipping options/locale/locale_es-ES.ini admin dashboard.new_version_hint
skipping options/locale/locale_pt-PT.ini org teams.add_nonexistent_repo
skipping options/locale/locale_hu-HU.ini install require_sign_in_view_popup
skipping options/locale/locale_hu-HU.ini repo migrate.invalid_local_path
skipping options/locale/locale_id-ID.ini repo migrate.invalid_local_path
skipping options/locale/locale_id-ID.ini org teams.add_nonexistent_repo
skipping options/locale/locale_de-DE.ini repo settings.protect_protected_file_patterns_desc
```

</details>

So this PR also does some small changes on them, to trigger the
re-translation.

### The `locale_el-GR.ini` contains many broken tranlsations

I guess we should reset them from crowdin side, then translators can
re-translate them.

----

Update: in latest main, the strings have been fixed.

## TODO

Update: the el-GR translators have done great job and fixes these broken
translations.


<details>

Merge this PR ASAP and upload `locale_el-GR.ini` to crowdin to remove
broken strings.


Out-dated, fixed in main.


![image](https://user-images.githubusercontent.com/2114189/226954531-36e14527-278a-41a1-8ddb-2b2b27bfc746.png)

</details>

---------

Co-authored-by: delvh <dev.lh@web.de>
2023-03-23 13:27:03 -04:00
wxiaoguang
378d6b8491
Fix incorrect show-modal and show-panel class (#23660)
That's incorrect code caused by Copy&Paste.

`show-modal` / `show-panel` are used by JS to show something, but these
links have `href`, they should navigate to new page.

Close #23657
2023-03-23 12:52:20 -04:00
Lunny Xiao
e8433b7fe6
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>
2023-03-23 23:18:24 +08:00
Zettat123
df411819eb
Check LFS/Packages settings in dump and doctor command (#23631)
Close #23622 

As described in the issue, disabling the LFS/Package settings will cause
errors when running `gitea dump` or `gitea doctor`. We need to check the
settings and the related operations should be skipped if the settings
are disabled.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-23 20:30:28 +08:00
wxiaoguang
9be90a5875
Use a general approach to show tooltip, fix temporary tooltip bug (#23574)
## TLDR

* Improve performance: lazy creating the tippy instances.
* Transparently support all "tooltip" elements, no need to call
`initTooltip` again and again.
* Fix a temporary tooltip re-entrance bug, which causes showing temp
content forever.
* Upgrade vue3-calendar-heatmap to 2.0.2 with lazy tippy init
(initHeatmap time decreases from 100ms to 50ms)

## Details

### The performance

Creating a lot of tippy tooltip instances is expensive. This PR doesn't
create all tippy tooltip instances, instead, it only adds "mouseover"
event listener to necessary elements, and then switches to the tippy
tooltip

### The general approach for all tooltips

Before, dynamically generated tooltips need to be called with
`initTooltip`.

After, use MutationObserver to:

* Attach the event listeners to newly created tooltip elements, work for
Vue (easier than before)
* Catch changed attributes and update the tooltip content (better than
before)

It does help a lot, eg:

1a4efa0ee9/web_src/js/components/PullRequestMergeForm.vue (L33-L36)

### Temporary tooltip re-entrance bug

To reproduce, on try.gitea.io, click the "copy clone url" quickly, then
the tooltip will be "Copied!" forever.

After this PR, with the help of `attachTippyTooltip`, the tooltip
content could be reset to the default correctly.

### Other changes

* `data-tooltip-content` is preferred from now on, the old
`data-content` may cause conflicts with other modules.
* `data-placement` was only used for tooltip, so it's renamed to
`data-tooltip-placement`, and removed from `createTippy`.
2023-03-23 17:56:15 +08:00
Zettat123
e7f0bcf884
Improve workflow event triggers (#23613)
Follow #23037 
Fix [#22598
comment](https://github.com/go-gitea/gitea/issues/22958#issuecomment-1475763042)

Workflows with `pull_request` trigger event can't be triggered by
`pull_request_sync` event. This PR adds the `canGithubEventMatch`
function to check if a Github event can match any Gitea event. If the
Github event matches a Gitea event, the related workflows should be
triggered.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-23 12:04:15 +08:00
155 changed files with 676 additions and 478 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;

89
build/backport-locales.go Normal file
View File

@ -0,0 +1,89 @@
//go:build ignore
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"gopkg.in/ini.v1"
)
func main() {
if len(os.Args) != 2 {
println("usage: backport-locales <to-ref>")
println("eg: backport-locales release/v1.19")
os.Exit(1)
}
ini.PrettyFormat = false
mustNoErr := func(err error) {
if err != nil {
panic(err)
}
}
collectInis := func(ref string) map[string]*ini.File {
inis := map[string]*ini.File{}
err := filepath.WalkDir("options/locale", func(path string, d os.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() || !strings.HasSuffix(d.Name(), ".ini") {
return nil
}
cfg, err := ini.LoadSources(ini.LoadOptions{
IgnoreInlineComment: true,
UnescapeValueCommentSymbols: true,
}, path)
mustNoErr(err)
inis[path] = cfg
fmt.Printf("collecting: %s @ %s\n", path, ref)
return nil
})
mustNoErr(err)
return inis
}
// collect new locales from current working directory
inisNew := collectInis("HEAD")
// switch to the target ref, and collect the old locales
cmd := exec.Command("git", "checkout", os.Args[1])
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
mustNoErr(cmd.Run())
inisOld := collectInis(os.Args[1])
// use old en-US as the base, and copy the new translations to the old locales
enUsOld := inisOld["options/locale/locale_en-US.ini"]
for path, iniOld := range inisOld {
if iniOld == enUsOld {
continue
}
iniNew := inisNew[path]
if iniNew == nil {
continue
}
for _, secEnUS := range enUsOld.Sections() {
secOld := iniOld.Section(secEnUS.Name())
secNew := iniNew.Section(secEnUS.Name())
for _, keyEnUs := range secEnUS.Keys() {
if secNew.HasKey(keyEnUs.Name()) {
oldStr := secOld.Key(keyEnUs.Name()).String()
newStr := secNew.Key(keyEnUs.Name()).String()
// A bug: many of new translations with ";" are broken in Crowdin (due to last messy restoring)
// As the broken strings are gradually fixed, this workaround check could be removed (in a few months?)
if strings.Contains(oldStr, ";") && !strings.Contains(newStr, ";") {
println("skip potential broken string", path, secEnUS.Name(), keyEnUs.Name())
continue
}
secOld.Key(keyEnUs.Name()).SetValue(newStr)
}
}
}
mustNoErr(iniOld.SaveTo(path))
}
}

View File

@ -250,6 +250,8 @@ func runDump(ctx *cli.Context) error {
if ctx.IsSet("skip-lfs-data") && ctx.Bool("skip-lfs-data") {
log.Info("Skip dumping LFS data")
} else if !setting.LFS.StartServer {
log.Info("LFS isn't enabled. Skip dumping LFS data")
} else if err := storage.LFS.IterateObjects("", func(objPath string, object storage.Object) error {
info, err := object.Stat()
if err != nil {
@ -364,6 +366,8 @@ func runDump(ctx *cli.Context) error {
if ctx.IsSet("skip-package-data") && ctx.Bool("skip-package-data") {
log.Info("Skip dumping package data")
} else if !setting.Packages.Enabled {
log.Info("Packages isn't enabled. Skip dumping package data")
} else if err := storage.Packages.IterateObjects("", func(objPath string, object storage.Object) error {
info, err := object.Stat()
if err != nil {

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.
@ -994,7 +994,7 @@ Default templates for project boards:
### Extended cron tasks (not enabled by default)
#### Cron - Garbage collect all repositories ('cron.git_gc_repos')
#### Cron - Garbage collect all repositories (`cron.git_gc_repos`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
@ -1003,42 +1003,42 @@ Default templates for project boards:
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
- `ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS
#### Cron - Update the '.ssh/authorized_keys' file with Gitea SSH keys ('cron.resync_all_sshkeys')
#### Cron - Update the '.ssh/authorized_keys' file with Gitea SSH keys (`cron.resync_all_sshkeys`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
#### Cron - Resynchronize pre-receive, update and post-receive hooks of all repositories ('cron.resync_all_hooks')
#### Cron - Resynchronize pre-receive, update and post-receive hooks of all repositories (`cron.resync_all_hooks`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
#### Cron - Reinitialize all missing Git repositories for which records exist ('cron.reinit_missing_repos')
#### Cron - Reinitialize all missing Git repositories for which records exist (`cron.reinit_missing_repos`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
#### Cron - Delete all repositories missing their Git files ('cron.delete_missing_repos')
#### Cron - Delete all repositories missing their Git files (`cron.delete_missing_repos`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
#### Cron - Delete generated repository avatars ('cron.delete_generated_repository_avatars')
#### Cron - Delete generated repository avatars (`cron.delete_generated_repository_avatars`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
#### Cron - Delete all old actions from database ('cron.delete_old_actions')
#### Cron - Delete all old actions from database (`cron.delete_old_actions`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
@ -1046,7 +1046,7 @@ Default templates for project boards:
- `SCHEDULE`: **@every 168h**: Cron syntax to set how often to check.
- `OLDER_THAN`: **@every 8760h**: any action older than this expression will be deleted from database, suggest using `8760h` (1 year) because that's the max length of heatmap.
#### Cron - Check for new Gitea versions ('cron.update_checker')
#### Cron - Check for new Gitea versions (`cron.update_checker`)
- `ENABLED`: **true**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
@ -1054,7 +1054,7 @@ Default templates for project boards:
- `SCHEDULE`: **@every 168h**: Cron syntax for scheduling a work, e.g. `@every 168h`.
- `HTTP_ENDPOINT`: **https://dl.gitea.io/gitea/version.json**: the endpoint that Gitea will check for newer versions
#### Cron - Delete all old system notices from database ('cron.delete_old_system_notices')
#### Cron - Delete all old system notices from database (`cron.delete_old_system_notices`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
@ -1062,7 +1062,7 @@ Default templates for project boards:
- `SCHEDULE`: **@every 168h**: Cron syntax to set how often to check.
- `OLDER_THAN`: **@every 8760h**: any system notice older than this expression will be deleted from database.
#### Cron - Garbage collect LFS pointers in repositories ('cron.gc_lfs')
#### Cron - Garbage collect LFS pointers in repositories (`cron.gc_lfs`)
- `ENABLED`: **false**: Enable service.
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).

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"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "usage"
parent: "administration"
name: "反向代理"
weight: 16
identifier: "reverse-proxies"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "Search Engines Indexation"
weight: 60
identifier: "search-engines-indexation"
@ -21,7 +21,7 @@ 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" >}})
create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< relref "doc/administration/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).

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "advanced"
parent: "administration"
name: "GPG Commit Signatures"
weight: 20
weight: 50
identifier: "signing"
---

View File

@ -1,13 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "進階"
slug: "advanced"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "進階"
weight: 40
identifier: "advanced"
---

View File

@ -1,13 +1,13 @@
---
date: "2021-01-22T00:00:00+02:00"
title: "Translation"
slug: "translation"
title: "Contributing"
slug: "contributing"
weight: 35
toc: false
draft: false
menu:
sidebar:
name: "Translation"
name: "Contributing"
weight: 50
identifier: "translation"
identifier: "contributing"
---

View File

@ -1,7 +1,7 @@
---
date: "2021-01-22T00:00:00+02:00"
title: "Übersetzung"
slug: "translation"
slug: "contributing"
weight: 35
toc: false
draft: false
@ -9,5 +9,5 @@ menu:
sidebar:
name: "Übersetzung"
weight: 50
identifier: "translation"
identifier: "contributing"
---

View File

@ -1,13 +1,13 @@
---
date: "2021-01-22T00:00:00+02:00"
title: "翻譯"
slug: "translation"
title: "貢獻"
slug: "contributing"
weight: 35
toc: false
draft: false
menu:
sidebar:
name: "翻譯"
name: "貢獻"
weight: 50
identifier: "translation"
identifier: "contributing"
---

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "contributing"
name: "Guidelines for Backend"
weight: 20
identifier: "guidelines-backend"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "contributing"
name: "Guidelines for Frontend"
weight: 20
identifier: "guidelines-frontend"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "contributing"
name: "Guidelines for Refactoring"
weight: 20
identifier: "guidelines-refactoring"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "features"
parent: "contributing"
name: "Localization"
weight: 20
identifier: "localization"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "features"
parent: "contributing"
name: "本地化"
weight: 20
identifier: "localization"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "features"
parent: "contributing"
name: "在地化"
weight: 20
identifier: "localization"

View File

@ -6,7 +6,7 @@ toc: true
draft: false
menu:
sidebar:
parent: "translation"
parent: "contributing"
name: "Übersetzungsrichtlinien"
weight: 70
identifier: "translation-guidelines"

View File

@ -6,7 +6,7 @@ toc: true
draft: false
menu:
sidebar:
parent: "translation"
parent: "contributing"
name: "Translation Guidelines"
weight: 70
identifier: "translation-guidelines"

View File

@ -1,13 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Developers"
slug: "developers"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "Developers"
weight: 55
identifier: "developers"
---

View File

@ -1,13 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "开发者"
slug: "developers"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "开发者"
weight: 55
identifier: "developers"
---

View File

@ -1,13 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "開發人員"
slug: "developers"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "開發人員"
weight: 55
identifier: "developers"
---

View File

@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Development"
slug: "development"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "Development"
weight: 40
identifier: "development"
---

View File

@ -1,13 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Advanced"
slug: "advanced"
weight: 30
title: "开发"
slug: "development"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "Advanced"
name: "开发"
weight: 40
identifier: "advanced"
identifier: "development"
---

View File

@ -1,13 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "进阶"
slug: "advanced"
weight: 30
title: "開發"
slug: "development"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "进阶"
name: "開發"
weight: 40
identifier: "advanced"
identifier: "development"
---

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "API Usage"
weight: 40
identifier: "api-usage"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "API 使用指南"
weight: 40
identifier: "api-usage"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "Hacking on Gitea"
weight: 10
identifier: "hacking-on-gitea"
@ -177,7 +177,7 @@ server as mentioned above.
### Working on JS and CSS
Frontend development should follow [Guidelines for Frontend Development]({{< relref "doc/developers/guidelines-frontend.en-us.md" >}})
Frontend development should follow [Guidelines for Frontend Development]({{< relref "doc/contributing/guidelines-frontend.en-us.md" >}})
To build with frontend resources, either use the `watch-frontend` target mentioned above or just build once:
@ -264,8 +264,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/administration/config-cheat-sheet.en-us.md" >}}'>configuration cheat sheet</a>
found in `docs/content/doc/administer/config-cheat-sheet.en-us.md`
### Changing the logo

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "玩转 Gitea"
weight: 10
identifier: "hacking-on-gitea"
@ -166,7 +166,7 @@ make lint-backend
### 处理 JS 和 CSS
前端开发应遵循 [Guidelines for Frontend Development]({{ < 相关参考 "doc/developers/guidelines-frontend.en-us.md" > }})
前端开发应遵循 [Guidelines for Frontend Development]({{ < 相关参考 "doc/development/guidelines-frontend.en-us.md" > }})
要使用前端资源构建请使用上面提到的“watch-frontend”目标或只构建一次
@ -247,7 +247,7 @@ make swagger-check
### 创建新的配置选项
创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini`
并到 <a href = '{{ < relref "doc/advanced/config-cheat-sheet.en-us.md" > }}'>配置备忘单</a>
并到 <a href = '{{ < relref "doc/administration/config-cheat-sheet.en-us.md" > }}'>配置备忘单</a>
`docs/content/doc/advanced/config-cheat-sheet.en-us.md` 中找到
### 更改Logo

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "Integrations"
weight: 65
identifier: "integrations"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "整合"
weight: 65
identifier: "integrations"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "Migrations Interfaces"
weight: 55
identifier: "migrations-interfaces"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "遷移介面"
weight: 55
identifier: "migrations-interfaces"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "OAuth2 Provider"
weight: 41
identifier: "oauth2-provider"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "developers"
parent: "development"
name: "OAuth2 提供者"
weight: 41
identifier: "oauth2-provider"

View File

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

View File

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

View File

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

View File

@ -8,6 +8,6 @@ draft: false
menu:
sidebar:
name: "Help"
weight: 5
weight: 100
identifier: "help"
---

View File

@ -8,6 +8,6 @@ draft: false
menu:
sidebar:
name: "Aide"
weight: 5
weight: 100
identifier: "help"
---

View File

@ -8,6 +8,6 @@ draft: false
menu:
sidebar:
name: "帮助"
weight: 5
weight: 100
identifier: "help"
---

View File

@ -8,6 +8,6 @@ draft: false
menu:
sidebar:
name: "幫助"
weight: 5
weight: 100
identifier: "help"
---

View File

@ -43,7 +43,7 @@ On the other hand, 1.x.x downloads should never change.
To migrate from Gogs to Gitea:
- [Gogs version 0.9.146 or less]({{< relref "doc/upgrade/from-gogs.en-us.md" >}})
- [Gogs version 0.9.146 or less]({{< relref "doc/installation/upgrade-from-gogs.en-us.md" >}})
- [Gogs version 0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286)
To migrate from GitHub to Gitea, you can use Gitea's built-in migration form.
@ -90,7 +90,7 @@ https://github.com/loganinak/MigrateGitlabToGogs
There are a few places that could make this show incorrectly.
1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide]({{< relref "doc/usage/reverse-proxies.en-us.md" >}})
1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}})
2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini`
If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
@ -103,7 +103,7 @@ If certain clone options aren't showing up (HTTP/S or SSH), the following option
This error occurs when the reverse proxy limits the file upload size.
See the [reverse proxy guide]({{< relref "doc/usage/reverse-proxies.en-us.md" >}}) for a solution with nginx.
See the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}) for a solution with nginx.
## Custom Templates not loading or working incorrectly
@ -116,7 +116,7 @@ The correct path for the template(s) will be relative to the `CustomPath`
If that doesn't exist, you can try `echo $GITEA_CUSTOM`
2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file)
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}}) page to add your template to the correct location.
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) page to add your template to the correct location.
## Active user vs login prohibited user
@ -126,7 +126,7 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo
## Setting up logging
- [Official Docs]({{< relref "doc/advanced/logging-documentation.en-us.md" >}})
- [Official Docs]({{< relref "doc/administration/logging-documentation.en-us.md" >}})
## What is Swagger?
@ -134,7 +134,7 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo
All Gitea instances have the built-in API and there is no way to disable it completely.
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api-usage.en-us.md" >}}).
For more information, refer to Gitea's [API docs]({{< relref "doc/development/api-usage.en-us.md" >}}).
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
@ -149,7 +149,7 @@ There are multiple things you can combine to prevent spammers.
1. By whitelisting or blocklisting certain email domains
2. By only whitelisting certain domains with OpenID (see below)
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/usage/command-line.en-us.md" >}}), [API]({{< relref "doc/developers/api-usage.en-us.md" >}}), or Gitea's Admin UI
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/administration/command-line.en-us.md" >}}), [API]({{< relref "doc/development/api-usage.en-us.md" >}}), or Gitea's Admin UI
### Only allow/block certain email domains
@ -175,7 +175,7 @@ At some point, a customer or third party needs access to a specific repo and onl
### Enable Fail2ban
Use [Fail2Ban]({{< relref "doc/usage/fail2ban-setup.en-us.md" >}}) to monitor and stop automated login attempts or other malicious behavior based on log patterns
Use [Fail2Ban]({{< relref "doc/administration/fail2ban-setup.en-us.md" >}}) to monitor and stop automated login attempts or other malicious behavior based on log patterns
## How to add/use custom themes
@ -328,24 +328,24 @@ You may want to set this value to `60m` or `120m`.
## How can I create users before starting Gitea
Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands]({{< relref "doc/usage/command-line.en-us.md#admin" >}}) to add users like normal.
Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands]({{< relref "doc/administration/command-line.en-us.md#admin" >}}) to add users like normal.
## How can I enable password reset
There is no setting for password resets. It is enabled when a [mail service]({{< relref "doc/usage/email-setup.en-us.md" >}}) is configured, and disabled otherwise.
There is no setting for password resets. It is enabled when a [mail service]({{< relref "doc/administration/email-setup.en-us.md" >}}) is configured, and disabled otherwise.
## How can a user's password be changed
- As an **admin**, you can change any user's password (and optionally force them to change it on next login)...
- By navigating to your `Site Administration -> User Accounts` page and editing a user.
- By using the [admin CLI commands]({{< relref "doc/usage/command-line.en-us.md#admin" >}}).
- By using the [admin CLI commands]({{< relref "doc/administration/command-line.en-us.md#admin" >}}).
Keep in mind most commands will also need a [global flag]({{< relref "doc/usage/command-line.en-us.md#global-options" >}}) to point the CLI at the correct configuration.
Keep in mind most commands will also need a [global flag]({{< relref "doc/administration/command-line.en-us.md#global-options" >}}) to point the CLI at the correct configuration.
- As a **user** you can change it...
- In your account `Settings -> Account` page (this method **requires** you to know your current password).
- By using the `Forgot Password` link.
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service]({{< relref "doc/usage/email-setup.en-us.md" >}}).
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service]({{< relref "doc/administration/email-setup.en-us.md" >}}).
## Why is my markdown broken
@ -457,6 +457,6 @@ If you are using Cloudflare, turn off the auto-minify option in the dashboard.
- You can also check `<ROOT_URL>/admin/config` for the repository root path.
- Ensure that the user/org exists that you want to adopt repositories for.
- As an admin, go to `<ROOT_URL>/admin/repos/unadopted` and search.
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#repository" >}}).
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}).
- If the above steps are done correctly, you should be able to select repositories to adopt.
- If no repositories are found, enable [debug logging]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors.
- If no repositories are found, enable [debug logging]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors.

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "features"
name: "Comparison"
weight: 5
parent: installation
identifier: "comparison"
---

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "features"
parent: "installation"
name: "横向对比"
weight: 5
identifier: "comparison"

View File

@ -7,7 +7,7 @@ toc: false
draft: false
menu:
sidebar:
parent: "features"
parent: "installation"
name: "比較"
weight: 5
identifier: "comparison"

View File

@ -9,7 +9,7 @@ menu:
sidebar:
parent: "installation"
name: "Database preparation"
weight: 20
weight: 5
identifier: "database-prep"
---

View File

@ -64,7 +64,7 @@ despite warnings like `This key is not certified with a trusted signature!`.
## Recommended server configuration
**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/advanced/environment-variables.en-us.md" >}}) as well!
**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/administration/environment-variables.en-us.md" >}}) as well!
Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
### Prepare environment
@ -113,7 +113,7 @@ If you don't want the web installer to be able to write to the config file, it i
* Ensure that the `SECRET_KEY` and `INTERNAL_TOKEN` values are set. (You may want to use the `gitea generate secret` to generate these secret keys.)
* Ensure that any other secret keys you need are set.
See the [command line documentation]({{< relref "doc/usage/command-line.en-us.md" >}}) for information on using `gitea generate secret`.
See the [command line documentation]({{< relref "doc/administration/command-line.en-us.md" >}}) for information on using `gitea generate secret`.
### Configure Gitea's working directory
@ -158,7 +158,7 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
You can update to a new version of Gitea by stopping Gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.
The binary file name should not be changed during the update to avoid problems in existing repositories.
It is recommended that you make a [backup]({{< relref "doc/usage/backup-and-restore.en-us.md" >}}) before updating your installation.
It is recommended that you make a [backup]({{< relref "doc/administration/backup-and-restore.en-us.md" >}}) before updating your installation.
If you have carried out the installation steps as described above, the binary should
have the generic name `gitea`. Do not change this, i.e. to include the version number.

View File

@ -59,7 +59,7 @@ gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-a
## 服务器设置
**提示:** `GITEA_WORK_DIR` 表示 Gitea 工作的路径。以下路径可以通过 [环境变量]({{< relref "doc/advanced/environment-variables.zh-cn.md" >}}) 初始化。
**提示:** `GITEA_WORK_DIR` 表示 Gitea 工作的路径。以下路径可以通过 [环境变量]({{< relref "doc/administration/environment-variables.zh-cn.md" >}}) 初始化。
### 准备环境
@ -141,7 +141,7 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
您可以通过停止程序,替换 `/usr/local/bin/gitea` 并重启来更新到新版本。直接替换可执行程序时不要更改或使用新的文件名称,以避免数据出错。
建议您在更新之前进行[备份]({{< relref "doc/usage/backup-and-restore.zh-cn.md" >}})。
建议您在更新之前进行[备份]({{< relref "doc/administration/backup-and-restore.zh-cn.md" >}})。
### 1. 使用 systemd 重新启动 Gitea推荐

View File

@ -33,7 +33,7 @@ executable path, you will have to manage this yourself.
**Note 2**: Go version {{< min-go-version >}} or higher is required. However, it is recommended to
obtain the same version as our continuous integration, see the advice given in
<a href='{{< relref "doc/developers/hacking-on-gitea.en-us.md" >}}'>Hacking on
<a href='{{< relref "doc/development/hacking-on-gitea.en-us.md" >}}'>Hacking on
Gitea</a>
**Table of Contents**
@ -87,7 +87,7 @@ 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/)
- `make`, see [here]({{< relref "doc/developers/hacking-on-gitea.en-us.md" >}}#installing-make)
- `make`, see [here]({{< relref "doc/development/hacking-on-gitea.en-us.md" >}}#installing-make)
Various [make tasks](https://github.com/go-gitea/gitea/blob/main/Makefile)
are provided to keep the build process as simple as possible.

View File

@ -1,17 +1,15 @@
---
date: "2021-09-02T16:00:00+08:00"
title: "Upgrade from an old Gitea"
aliases:
- /en-us/upgrade/
slug: "upgrade-from-gitea"
weight: 10
toc: false
draft: false
menu:
sidebar:
parent: "upgrade"
name: "From Gitea"
weight: 10
parent: "installation"
name: "Upgrade From Old Gitea"
weight: 100
identifier: "upgrade-from-gitea"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "upgrade"
name: "From Gogs"
weight: 10
parent: "installation"
name: "Upgrade From Gogs"
weight: 101
identifier: "upgrade-from-gogs"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "upgrade"
parent: "installation"
name: "Depuis Gogs"
weight: 10
weight: 101
identifier: "upgrade-from-gogs"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "upgrade"
parent: "installation"
name: "从 Gogs 升级"
weight: 10
weight: 101
identifier: "upgrade-from-gogs"
---

View File

@ -7,9 +7,9 @@ toc: false
draft: false
menu:
sidebar:
parent: "upgrade"
name: "從 Gogs"
weight: 10
parent: "installation"
name: "從 Gogs 升級"
weight: 101
identifier: "upgrade-from-gogs"
---

View File

@ -9,7 +9,7 @@ menu:
sidebar:
parent: "installation"
name: "With Docker Rootless"
weight: 10
weight: 48
identifier: "install-with-docker-rootless"
---

View File

@ -9,7 +9,7 @@ menu:
sidebar:
parent: "installation"
name: "With Docker"
weight: 10
weight: 49
identifier: "install-with-docker"
---

View File

@ -9,7 +9,7 @@ menu:
sidebar:
parent: "installation"
name: "Docker"
weight: 10
weight: 49
identifier: "install-with-docker"
---

View File

@ -9,7 +9,7 @@ menu:
sidebar:
parent: "installation"
name: "使用 Docker 安装"
weight: 10
weight: 49
identifier: "install-with-docker"
---

View File

@ -9,7 +9,7 @@ menu:
sidebar:
parent: "installation"
name: "Docker 安裝"
weight: 10
weight: 49
identifier: "install-with-docker"
---

View File

@ -1,12 +1,13 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Package Registry"
date: "2016-12-27T16:00:00+02:00"
title: "Packages"
slug: "packages"
weight: 35
toc: false
draft: false
menu:
sidebar:
name: "Package Registry"
weight: 45
name: "Usage - Packages"
weight: 30
identifier: "packages"
---

View File

@ -1,7 +1,7 @@
---
date: "2022-11-20T00:00:00+00:00"
title: "Cargo Packages Repository"
slug: "packages/cargo"
slug: "usage/packages/cargo"
draft: false
toc: false
menu:
@ -73,7 +73,7 @@ token = "Bearer {token}"
| Parameter | Description |
| --------- | ----------- |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) |
| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) |
## Publish a package

View File

@ -1,7 +1,7 @@
---
date: "2023-01-20T00:00:00+00:00"
title: "Chef Packages Repository"
slug: "packages/chef"
slug: "usage/packages/chef"
draft: false
toc: false
menu:

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Composer Packages Repository"
slug: "packages/composer"
slug: "usage/packages/composer"
draft: false
toc: false
menu:
@ -60,7 +60,7 @@ curl --user your_username:your_password_or_token \
https://gitea.example.com/api/packages/testuser/composer?version=1.0.3
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password.
The server responds with the following HTTP Status codes.

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Conan Packages Repository"
slug: "packages/conan"
slug: "usage/packages/conan"
draft: false
toc: false
menu:
@ -37,7 +37,7 @@ conan user --remote {remote} --password {password} {username}
| -----------| ----------- |
| `remote` | The remote name. |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
For example:

View File

@ -1,7 +1,7 @@
---
date: "2022-12-28T00:00:00+00:00"
title: "Conda Packages Repository"
slug: "packages/conda"
slug: "usage/packages/conda"
draft: false
toc: false
menu:

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Container Registry"
slug: "packages/container"
slug: "usage/packages/container"
draft: false
toc: false
menu:
@ -34,7 +34,7 @@ To push an image or if the image is in a private registry, you have to authentic
docker login gitea.example.com
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password.
## Image naming convention

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Generic Packages Repository"
slug: "packages/generic"
slug: "usage/packages/generic"
draft: false
toc: false
menu:
@ -22,7 +22,7 @@ Publish generic files, like release binaries or other output, for your user or o
## Authenticate to the package registry
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}).
## Publish a package
@ -48,7 +48,7 @@ curl --user your_username:your_password_or_token \
https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password.
The server reponds with the following HTTP Status codes.

View File

@ -1,7 +1,7 @@
---
date: "2022-04-14T00:00:00+00:00"
title: "Helm Chart Registry"
slug: "packages/helm"
slug: "usage/packages/helm"
draft: false
toc: false
menu:
@ -42,7 +42,7 @@ helm cm-push ./{chart_file}.tgz {repo}
| Parameter | Description |
| ------------ | ----------- |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `repo` | The name for the repository. |
| `chart_file` | The Helm Chart archive. |
| `owner` | The owner of the package. |

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Maven Packages Repository"
slug: "packages/maven"
slug: "usage/packages/maven"
draft: false
toc: false
menu:
@ -70,7 +70,7 @@ Afterwards add the following sections to your project `pom.xml` file:
| Parameter | Description |
| -------------- | ----------- |
| `access_token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| `access_token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). |
| `owner` | The owner of the package. |
### Gradle variant

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "npm Packages Repository"
slug: "packages/npm"
slug: "usage/packages/npm"
draft: false
toc: false
menu:
@ -41,7 +41,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
| ------------ | ----------- |
| `scope` | The scope of the packages. |
| `owner` | The owner of the package. |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). |
For example:

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "NuGet Packages Repository"
slug: "packages/nuget"
slug: "usage/packages/nuget"
draft: false
toc: false
menu:
@ -38,7 +38,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p
| ------------- | ----------- |
| `source_name` | The desired source name. |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
For example:
@ -47,7 +47,7 @@ For example:
dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json
```
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}).
## Publish a package

View File

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Package Registry"
slug: "packages/overview"
slug: "usage/packages/overview"
draft: false
toc: false
menu:

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