From f2a94ba955c3ed402e926cc42baa83a0cf799788 Mon Sep 17 00:00:00 2001 From: HesterG Date: Thu, 8 Jun 2023 17:40:05 +0800 Subject: [PATCH 01/42] Change branch name from master to main in some documents' links (#25126) (#25140) Backport #25126 to 1.20 As title. And needs to backport to 1.19 --- doc/administration/config-cheat-sheet.zh-cn.md | 2 +- doc/administration/customizing-gitea.zh-cn.md | 4 ++-- doc/contributing/localization.en-us.md | 2 +- doc/contributing/localization.zh-cn.md | 2 +- doc/contributing/localization.zh-tw.md | 2 +- doc/development/migrations.zh-tw.md | 4 ++-- doc/installation/from-source.fr-fr.md | 2 +- doc/installation/from-source.zh-tw.md | 2 +- doc/installation/run-as-service-in-ubuntu.zh-cn.md | 4 ++-- doc/installation/run-as-service-in-ubuntu.zh-tw.md | 4 ++-- page/index.fr-fr.md | 2 +- page/index.zh-tw.md | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/administration/config-cheat-sheet.zh-cn.md b/doc/administration/config-cheat-sheet.zh-cn.md index ba28b981..233d252a 100644 --- a/doc/administration/config-cheat-sheet.zh-cn.md +++ b/doc/administration/config-cheat-sheet.zh-cn.md @@ -18,7 +18,7 @@ menu: # 配置说明 这是针对Gitea配置文件的说明,你可以了解Gitea的强大配置。需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。 -所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) 查看到。 +所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) 查看到。 如果你发现 `%(X)s` 这样的内容,请查看 [ini](https://github.com/go-ini/ini/#recursive-values) 这里的说明。 标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。 diff --git a/doc/administration/customizing-gitea.zh-cn.md b/doc/administration/customizing-gitea.zh-cn.md index 47230dde..64115ba1 100644 --- a/doc/administration/customizing-gitea.zh-cn.md +++ b/doc/administration/customizing-gitea.zh-cn.md @@ -24,7 +24,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板 `custom/conf/app.ini` 当中。在发行版中可能会以 `/etc/gitea/` 的形式为 `custom` 设置一个符号链接,查看配置详情请移步: - [快速备忘单](https://docs.gitea.io/en-us/config-cheat-sheet/) -- [完整配置清单](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) +- [完整配置清单](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) 如果您在 binary 同目录下无法找到 `custom` 文件夹,请检查您的 `GITEA_CUSTOM` 环境变量配置, 因为它可能被配置到了其他地方(可能被一些启动脚本设置指定了目录)。 @@ -67,7 +67,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板 同理,您可以将页签添加到 `extra_tabs.tmpl` 中,使用同样的方式来添加页签。它的具体样式需要与 `templates/repo/header.tmpl` 中已有的其他选项卡的样式匹配 -([source in GitHub](https://github.com/go-gitea/gitea/blob/master/templates/repo/header.tmpl)) +([source in GitHub](https://github.com/go-gitea/gitea/blob/main/templates/repo/header.tmpl)) ### 页面的其他新增内容 diff --git a/doc/contributing/localization.en-us.md b/doc/contributing/localization.en-us.md index b9be9822..c9591254 100644 --- a/doc/contributing/localization.en-us.md +++ b/doc/contributing/localization.en-us.md @@ -20,7 +20,7 @@ menu: Gitea's localization happens through our [Crowdin project](https://crowdin.com/project/gitea). For changes to an **English** translation, a pull request can be made that changes the appropriate key in -the [english locale](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini). +the [english locale](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini). For changes to a **non-English** translation, refer to the Crowdin project above. diff --git a/doc/contributing/localization.zh-cn.md b/doc/contributing/localization.zh-cn.md index c6d0830e..659a4733 100644 --- a/doc/contributing/localization.zh-cn.md +++ b/doc/contributing/localization.zh-cn.md @@ -19,7 +19,7 @@ menu: Gitea的本地化是通过我们的[Crowdin项目](https://crowdin.com/project/gitea)进行的。 -对于对**英语翻译**的更改,可以发出pull-request,来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)中合适的关键字。 +对于对**英语翻译**的更改,可以发出pull-request,来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini)中合适的关键字。 有关对**非英语**翻译的更改,请参阅上面的 Crowdin 项目。 diff --git a/doc/contributing/localization.zh-tw.md b/doc/contributing/localization.zh-tw.md index e9c207d3..43c67800 100644 --- a/doc/contributing/localization.zh-tw.md +++ b/doc/contributing/localization.zh-tw.md @@ -19,7 +19,7 @@ menu: 我們在 [Crowdin 專案](https://crowdin.com/project/gitea)上進行在地化工作。 -**英語系**的翻譯,可在修改[英文語言檔](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)後提出合併請求。 +**英語系**的翻譯,可在修改[英文語言檔](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini)後提出合併請求。 **非英語系**的翻譯,請前往上述的 Crowdin 專案。 diff --git a/doc/development/migrations.zh-tw.md b/doc/development/migrations.zh-tw.md index de4ddd78..c4171f3f 100644 --- a/doc/development/migrations.zh-tw.md +++ b/doc/development/migrations.zh-tw.md @@ -31,11 +31,11 @@ Gitea 定義了一些基本物件於套件 [modules/migration](https://github.co - 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`。 - 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`。 -您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migration/downloader.go) 中找到這些介面。 +您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/main/modules/migration/downloader.go) 中找到這些介面。 ## Uploader 介面 目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。 目前尚未支援其它 Uploader。 -您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migration/uploader.go) 中找到這些介面。 +您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/main/modules/migration/uploader.go) 中找到這些介面。 diff --git a/doc/installation/from-source.fr-fr.md b/doc/installation/from-source.fr-fr.md index 544059b5..6e2ff164 100644 --- a/doc/installation/from-source.fr-fr.md +++ b/doc/installation/from-source.fr-fr.md @@ -55,7 +55,7 @@ git checkout pr-xyz ## Compilation -Comme nous regroupons déjà toutes les bibliothèques requises pour compiler Gitea, vous pouvez continuer avec le processus de compilation lui-même. Nous fournissons diverses [tâches Make](https://github.com/go-gitea/gitea/blob/master/Makefile) pour rendre le processus de construction aussi simple que possible. [Voyez ici comment obtenir Make](/fr-fr/hacking-on-gitea/). Selon vos besoins, vous pourrez éventuellement ajouter diverses options de compilation, vous pouvez choisir entre ces options : +Comme nous regroupons déjà toutes les bibliothèques requises pour compiler Gitea, vous pouvez continuer avec le processus de compilation lui-même. Nous fournissons diverses [tâches Make](https://github.com/go-gitea/gitea/blob/main/Makefile) pour rendre le processus de construction aussi simple que possible. [Voyez ici comment obtenir Make](/fr-fr/hacking-on-gitea/). Selon vos besoins, vous pourrez éventuellement ajouter diverses options de compilation, vous pouvez choisir entre ces options : * `bindata`: Intègre toutes les ressources nécessaires à l'exécution d'une instance de Gitea, ce qui rend un déploiement facile car il n'est pas nécessaire de se préoccuper des fichiers supplémentaires. * `sqlite sqlite_unlock_notify`: Active la prise en charge d'une base de données [SQLite3](https://sqlite.org/), ceci n'est recommandé que pour les petites installations de Gitea. diff --git a/doc/installation/from-source.zh-tw.md b/doc/installation/from-source.zh-tw.md index f9e6e06e..ea34b7e1 100644 --- a/doc/installation/from-source.zh-tw.md +++ b/doc/installation/from-source.zh-tw.md @@ -46,7 +46,7 @@ git checkout v{{< version >}} ## 編譯 -完成設定相依性套件環境等工作後,您就可以開始編譯工作了。我們提供了不同的[編譯選項](https://github.com/go-gitea/gitea/blob/master/Makefile) ,讓編譯過程更加簡單。您可以根據需求來調整編譯選項,底下是可用的編譯選項說明: +完成設定相依性套件環境等工作後,您就可以開始編譯工作了。我們提供了不同的[編譯選項](https://github.com/go-gitea/gitea/blob/main/Makefile) ,讓編譯過程更加簡單。您可以根據需求來調整編譯選項,底下是可用的編譯選項說明: * `bindata`: 使用此標籤來嵌入所有 Gitea 相關資源,您不用擔心其他額外檔案,對於部署來說非常方便。 * `sqlite sqlite_unlock_notify`: 使用此標籤來啟用 [SQLite3](https://sqlite.org/) 資料庫,建議只有少數人時才使用此模式。 diff --git a/doc/installation/run-as-service-in-ubuntu.zh-cn.md b/doc/installation/run-as-service-in-ubuntu.zh-cn.md index 62312c06..1512a4ab 100644 --- a/doc/installation/run-as-service-in-ubuntu.zh-cn.md +++ b/doc/installation/run-as-service-in-ubuntu.zh-cn.md @@ -25,7 +25,7 @@ menu: sudo vim /etc/systemd/system/gitea.service ``` -接着拷贝示例代码 [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) 并取消对任何需要运行在主机上的服务部分的注释,譬如 MySQL。 +接着拷贝示例代码 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) 并取消对任何需要运行在主机上的服务部分的注释,譬如 MySQL。 修改 user,home 目录以及其他必须的初始化参数,如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。 @@ -58,7 +58,7 @@ sudo vim /etc/supervisor/supervisord.conf ``` 增加如下示例配置 -[supervisord config](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea)。 +[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea)。 将 user(git) 和 home(/home/git) 设置为与上文部署中匹配的值。如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。 diff --git a/doc/installation/run-as-service-in-ubuntu.zh-tw.md b/doc/installation/run-as-service-in-ubuntu.zh-tw.md index 6b8a4cfc..7465f225 100644 --- a/doc/installation/run-as-service-in-ubuntu.zh-tw.md +++ b/doc/installation/run-as-service-in-ubuntu.zh-tw.md @@ -21,7 +21,7 @@ menu: #### 使用 systemd -複製範例 [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) 到 `/etc/systemd/system/gitea.service` 後用您喜愛的文字編輯器開啟檔案。 +複製範例 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) 到 `/etc/systemd/system/gitea.service` 後用您喜愛的文字編輯器開啟檔案。 取消註解任何需要在此系統上啟動的服務像是 MySQL。 @@ -55,7 +55,7 @@ sudo apt install supervisor mkdir /home/git/gitea/log/supervisor ``` -附加範例 [supervisord config](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea) 的設定值到 `/etc/supervisor/supervisord.conf`。 +附加範例 [supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea) 的設定值到 `/etc/supervisor/supervisord.conf`。 用您喜愛的文字編輯器修改使用者(git)和家目錄(/home/git)設定以符合部署環境。若預設埠已被占用請修改埠號或移除「-p」旗標。 diff --git a/page/index.fr-fr.md b/page/index.fr-fr.md index 2eccf70b..64dcdbc0 100755 --- a/page/index.fr-fr.md +++ b/page/index.fr-fr.md @@ -70,7 +70,7 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide - MSSQL - [TiDB](https://github.com/pingcap/tidb) (MySQL protocol) - Fichier de configuration - - Voir [ici](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) + - Voir [ici](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) - Panel d'administration - Statistiques - Actions diff --git a/page/index.zh-tw.md b/page/index.zh-tw.md index ebff6aac..4f5558c6 100644 --- a/page/index.zh-tw.md +++ b/page/index.zh-tw.md @@ -71,7 +71,7 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G - MSSQL - TiDB(MySQL 協議) - 設定檔 - - [app.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) + - [app.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) - 管理員面板 - 系統摘要 - 維護操作 From ca66a6c7b9194d334a67ef748e1c151c116813b8 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 12 Jun 2023 11:17:43 -0400 Subject: [PATCH 02/42] Improve some documents: release version, logging, NFS lock (#25202) (#25204) Backport #25202 by @wxiaoguang Close #23654 Close #24684 @techknowlogick I still think we need to rename https://dl.gitea.com/gitea/1.20/ to https://dl.gitea.com/gitea/1.20-nightly/ `/gitea/1.20/` is quite confusing, it needs these words to explain why. If we call it `1.20-nightly`, the FAQ can be simplified a lot. Co-authored-by: wxiaoguang --- doc/help/faq.en-us.md | 44 +++++++++++++++++++-------------------- doc/help/support.en-us.md | 21 ++----------------- 2 files changed, 23 insertions(+), 42 deletions(-) diff --git a/doc/help/faq.en-us.md b/doc/help/faq.en-us.md index 347e8d42..f609b6c8 100644 --- a/doc/help/faq.en-us.md +++ b/doc/help/faq.en-us.md @@ -25,21 +25,19 @@ For more help resources, check all [Support Options]({{< relref "doc/help/suppor {{< toc >}} -## Difference between 1.x and 1.x.x downloads +## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes? -Version 1.7.x will be used for this example. +Version 1.20.x will be used for this example. -**NOTE:** this example applies to Docker images as well! +On our [downloads page](https://dl.gitea.com/gitea/) you will see a 1.20 directory, as well as directories for 1.20.0, 1.20.1. -On our [downloads page](https://dl.gitea.io/gitea/) you will see a 1.7 directory, as well as directories for 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, and 1.7.6. +The 1.20 directory is the nightly build, which is built on each merged commit to the [`release/v1.20`](https://github.com/go-gitea/gitea/tree/release/v1.20) branch. -The 1.7 and 1.7.0 directories are **not** the same. The 1.7 directory is built on each merged commit to the [`release/v1.7`](https://github.com/go-gitea/gitea/tree/release/v1.7) branch. +The 1.20.0 directory is a release build that was created when the [`v1.20.0`](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) tag was created. -The 1.7.0 directory, however, is a build that was created when the [`v1.7.0`](https://github.com/go-gitea/gitea/releases/tag/v1.7.0) tag was created. +The nightly builds (1.x) downloads will change as commits are merged to their respective branch, they contain the latest changes/fixes before a tag release is built. -This means that 1.x downloads will change as commits are merged to their respective branch (think of it as a separate "main" branch for each release). - -On the other hand, 1.x.x downloads should never change. +If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get the "1.20-nightly" build to get the bug fix. ## How to migrate from Gogs/GitHub/etc. to Gitea @@ -404,14 +402,6 @@ You will also need to change the app.ini database charset to `CHARSET=utf8mb4`. Gitea requires the system or browser to have one of the supported Emoji fonts installed, which are Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji and Twemoji Mozilla. Generally, the operating system should already provide one of these fonts, but especially on Linux, it may be necessary to install them manually. -## Stdout logging on SystemD and Docker - -Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl `. - -Similarly, stdout on docker can be viewed using `docker logs `. - -To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}). - ## Initial logging Before Gitea has read the configuration file and set-up its logging it will log a number of things to stdout in order to help debug things if logging does not work. @@ -454,12 +444,6 @@ gitea doctor recreate-table It is highly recommended to back-up your database before running these commands. -## Why are tabs/indents wrong when viewing files - -If you are using Cloudflare, turn off the auto-minify option in the dashboard. - -`Speed` -> `Optimization` -> Uncheck `HTML` within the `Auto-Minify` settings. - ## How to adopt repositories from disk - Add your (bare) repositories to the correct spot for your configuration (`repository.ROOT`), ensuring they are in the correct layout `/[user]/[repo].git`. @@ -470,3 +454,17 @@ If you are using Cloudflare, turn off the auto-minify option in the dashboard. - 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/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors. + +## Gitea can't start on NFS + +In most cases, it's caused by broken NFS lock system. You can try to stop Gitea process and +run `flock -n /data-nfs/gitea/queues/LOCK echo 'lock acquired'` to see whether the lock can be acquired immediately. +If the lock can't be acquired, NFS might report some errors like `lockd: cannot monitor node-3, statd: server rpc.statd not responding, timed out` in its server logs. + +Then the NFS lock could be reset by: + +```bash +# /etc/init.d/nfs stop +# rm -rf /var/lib/nfs/sm/* +# /etc/init.d/nfs start +``` diff --git a/doc/help/support.en-us.md b/doc/help/support.en-us.md index c6db3d6e..eb0e1865 100644 --- a/doc/help/support.en-us.md +++ b/doc/help/support.en-us.md @@ -35,30 +35,13 @@ menu: [log] LEVEL=debug MODE=console,file - ROUTER=console,file - XORM=console,file - ENABLE_XORM_LOG=true - FILE_NAME=gitea.log - [log.file.router] - FILE_NAME=router.log - [log.file.xorm] - FILE_NAME=xorm.log ``` 3. Any error messages you are seeing. 4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue. - This will greatly improve the chance that the root of the issue can be quickly discovered and resolved. -5. If you meet slow/hanging/deadlock problems, please report the stack trace when the problem occurs: - 1. Enable pprof in `app.ini` and restart Gitea - - ```ini - [server] - ENABLE_PPROF = true - ``` - - 2. Trigger the bug, when Gitea gets stuck, use curl or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` (IP must be `127.0.0.1` and port must be `6060`). - 3. If you are using Docker, please use `docker exec -it curl "http://127.0.0.1:6060/debug/pprof/goroutine?debug=1"`. - 4. Report the output (the stack trace doesn't contain sensitive data) +5. If you encounter slow/hanging/deadlock problems, please report the stack trace when the problem occurs. + Go to the "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report". ## Bugs From 04898814a1b64f53939465f1631a26a6bab24a55 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 14 Jun 2023 02:36:52 -0400 Subject: [PATCH 03/42] Fix all possible setting error related storages and added some tests (#23911) (#25244) Backport #23911 by @lunny Follow up #22405 Fix #20703 This PR rewrites storage configuration read sequences with some breaks and tests. It becomes more strict than before and also fixed some inherit problems. - Move storage's MinioConfig struct into setting, so after the configuration loading, the values will be stored into the struct but not still on some section. - All storages configurations should be stored on one section, configuration items cannot be overrided by multiple sections. The prioioty of configuration is `[attachment]` > `[storage.attachments]` | `[storage.customized]` > `[storage]` > `default` - For extra override configuration items, currently are `SERVE_DIRECT`, `MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another section. The prioioty of the override configuration is `[attachment]` > `[storage.attachments]` > `default`. - Add more tests for storages configurations. - Update the storage documentations. Co-authored-by: Lunny Xiao Co-authored-by: wxiaoguang --- .../config-cheat-sheet.en-us.md | 61 +++++++++++++++++-- .../config-cheat-sheet.zh-cn.md | 57 +++++++++++++++-- 2 files changed, 110 insertions(+), 8 deletions(-) diff --git a/doc/administration/config-cheat-sheet.en-us.md b/doc/administration/config-cheat-sheet.en-us.md index e3612f37..7b94c7a4 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/doc/administration/config-cheat-sheet.en-us.md @@ -1254,8 +1254,9 @@ is `data/lfs` and the default of `MINIO_BASE_PATH` is `lfs/`. ## Storage (`storage`) -Default storage configuration for attachments, lfs, avatars and etc. +Default storage configuration for attachments, lfs, avatars, repo-avatars, repo-archive, packages, actions_log, actions_artifact. +- `STORAGE_TYPE`: **local**: Storage type, `local` for local disk or `minio` for s3 compatible object storage service. - `SERVE_DIRECT`: **false**: Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing. - `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when `STORAGE_TYPE` is `minio` - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when `STORAGE_TYPE` is `minio` @@ -1265,9 +1266,56 @@ Default storage configuration for attachments, lfs, avatars and etc. - `MINIO_USE_SSL`: **false**: Minio enabled ssl only available when `STORAGE_TYPE` is `minio` - `MINIO_INSECURE_SKIP_VERIFY`: **false**: Minio skip SSL verification available when STORAGE_TYPE is `minio` -And you can also define a customize storage like below: +The recommanded storage configuration for minio like below: ```ini +[storage] +STORAGE_TYPE = minio +; Minio endpoint to connect only available when STORAGE_TYPE is `minio` +MINIO_ENDPOINT = localhost:9000 +; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` +MINIO_ACCESS_KEY_ID = +; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` +MINIO_SECRET_ACCESS_KEY = +; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio` +MINIO_BUCKET = gitea +; Minio location to create bucket only available when STORAGE_TYPE is `minio` +MINIO_LOCATION = us-east-1 +; Minio enabled ssl only available when STORAGE_TYPE is `minio` +MINIO_USE_SSL = false +; Minio skip SSL verification available when STORAGE_TYPE is `minio` +MINIO_INSECURE_SKIP_VERIFY = false +SERVE_DIRECT = true +``` + +Defaultly every storage has their default base path like below + +| storage | default base path | +| ----------------- | ------------------ | +| attachments | attachments/ | +| lfs | lfs/ | +| avatars | avatars/ | +| repo-avatars | repo-avatars/ | +| repo-archive | repo-archive/ | +| packages | packages/ | +| actions_log | actions_log/ | +| actions_artifacts | actions_artifacts/ | + +And bucket, basepath or `SERVE_DIRECT` could be special or overrided, if you want to use a different you can: + +```ini +[storage.actions_log] +MINIO_BUCKET = gitea_actions_log +SERVE_DIRECT = true +MINIO_BASE_PATH = my_actions_log/ ; default is actions_log/ if blank +``` + +If you want to customerize a different storage for `lfs` if above default storage defined + +```ini +[lfs] +STORAGE_TYPE = my_minio + [storage.my_minio] STORAGE_TYPE = minio ; Minio endpoint to connect only available when STORAGE_TYPE is `minio` @@ -1286,8 +1334,6 @@ MINIO_USE_SSL = false MINIO_INSECURE_SKIP_VERIFY = false ``` -And used by `[attachment]`, `[lfs]` and etc. as `STORAGE_TYPE`. - ## Repository Archive Storage (`storage.repo-archive`) Configuration for repository archive storage. It will inherit from default `[storage]` or @@ -1306,6 +1352,11 @@ is `data/repo-archive` and the default of `MINIO_BASE_PATH` is `repo-archive/`. - `MINIO_USE_SSL`: **false**: Minio enabled ssl only available when `STORAGE_TYPE` is `minio` - `MINIO_INSECURE_SKIP_VERIFY`: **false**: Minio skip SSL verification available when STORAGE_TYPE is `minio` +## Repository Archives (`repo-archive`) + +- `STORAGE_TYPE`: **local**: Storage type for actions logs, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]` +- `MINIO_BASE_PATH`: **repo-archive/**: Minio base path on the bucket only available when STORAGE_TYPE is `minio` + ## Proxy (`proxy`) - `PROXY_ENABLED`: **false**: Enable the proxy if true, all requests to external via HTTP will be affected, if false, no proxy will be used even environment http_proxy/https_proxy @@ -1324,6 +1375,8 @@ PROXY_HOSTS = *.github.com - `ENABLED`: **false**: Enable/Disable actions capabilities - `DEFAULT_ACTIONS_URL`: **https://gitea.com**: Default address to get action plugins, e.g. the default value means downloading from "" for "uses: actions/checkout@v3" +- `STORAGE_TYPE`: **local**: Storage type for actions logs, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]` +- `MINIO_BASE_PATH`: **actions_log/**: Minio base path on the bucket only available when STORAGE_TYPE is `minio` `DEFAULT_ACTIONS_URL` indicates where should we find the relative path action plugin. i.e. when use an action in a workflow file like diff --git a/doc/administration/config-cheat-sheet.zh-cn.md b/doc/administration/config-cheat-sheet.zh-cn.md index 233d252a..d0af323d 100644 --- a/doc/administration/config-cheat-sheet.zh-cn.md +++ b/doc/administration/config-cheat-sheet.zh-cn.md @@ -414,7 +414,7 @@ LFS 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配置将从 `[stora ## Storage (`storage`) -Attachments, lfs, avatars and etc 的默认存储配置。 +Attachments, lfs, avatars, repo-avatars, repo-archive, packages, actions_log, actions_artifact 的默认存储配置。 - `STORAGE_TYPE`: **local**: 附件存储类型,`local` 将存储到本地文件夹, `minio` 将存储到 s3 兼容的对象存储服务中。 - `SERVE_DIRECT`: **false**: 允许直接重定向到存储系统。当前,仅 Minio/S3 是支持的。 @@ -425,9 +425,59 @@ Attachments, lfs, avatars and etc 的默认存储配置。 - `MINIO_LOCATION`: **us-east-1**: Minio location to create bucket,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 - `MINIO_USE_SSL`: **false**: Minio enabled ssl,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 -你也可以自定义一个存储的名字如下: +以下为推荐的 recommanded storage configuration for minio like below: ```ini +[storage] +STORAGE_TYPE = minio +; uncomment when STORAGE_TYPE = local +; PATH = storage root path +; Minio endpoint to connect only available when STORAGE_TYPE is `minio` +MINIO_ENDPOINT = localhost:9000 +; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` +MINIO_ACCESS_KEY_ID = +; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` +MINIO_SECRET_ACCESS_KEY = +; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio` +MINIO_BUCKET = gitea +; Minio location to create bucket only available when STORAGE_TYPE is `minio` +MINIO_LOCATION = us-east-1 +; Minio enabled ssl only available when STORAGE_TYPE is `minio` +MINIO_USE_SSL = false +; Minio skip SSL verification available when STORAGE_TYPE is `minio` +MINIO_INSECURE_SKIP_VERIFY = false +SERVE_DIRECT = true +``` + +默认的,每一个存储都会有各自默认的 BasePath 在同一个minio中,默认值如下: + +| storage | default base path | +| ----------------- | ------------------ | +| attachments | attachments/ | +| lfs | lfs/ | +| avatars | avatars/ | +| repo-avatars | repo-avatars/ | +| repo-archive | repo-archive/ | +| packages | packages/ | +| actions_log | actions_log/ | +| actions_artifacts | actions_artifacts/ | + +同时 bucket, basepath or `SERVE_DIRECT` 是可以被覆写的,像如下所示: + +```ini +[storage.actions_log] +MINIO_BUCKET = gitea_actions_log +SERVE_DIRECT = true +MINIO_BASE_PATH = my_actions_log/ ; default is actions_log/ if blank +``` + +当然你也可以完全自定义,像如下 + +```ini +[lfs] +STORAGE_TYPE = my_minio +MINIO_BASE_PATH = my_lfs_basepath + [storage.my_minio] STORAGE_TYPE = minio ; Minio endpoint to connect only available when STORAGE_TYPE is `minio` @@ -444,10 +494,9 @@ MINIO_LOCATION = us-east-1 MINIO_USE_SSL = false ; Minio skip SSL verification available when STORAGE_TYPE is `minio` MINIO_INSECURE_SKIP_VERIFY = false +SERVE_DIRECT = true ``` -然后你在 `[attachment]`, `[lfs]` 等中可以把这个名字用作 `STORAGE_TYPE` 的值。 - ## Repository Archive Storage (`storage.repo-archive`) Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配置将从 `[storage]` 继承。如果不为 `local` 或者 `minio` 而为 `xxx`, 则从 `[storage.xxx]` 继承。当继承时, `PATH` 默认为 `data/repo-archive`,`MINIO_BASE_PATH` 默认为 `repo-archive/`。 From a0f4523e69e24a06f6c8d8e6563fc31a2de5cf65 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 16 Jun 2023 00:09:03 -0400 Subject: [PATCH 04/42] Docs about how to generate config for act runner with docker and setup it with docker-compose (#25256) (#25296) Backport #25256 by @thezzisu In this pull request, the following changes are addressed: - State user should create `config.yaml` before start container to avoid errors. - Provided instructions to deploy runners using docker compose. Co-authored-by: Zisu Zhang --- doc/usage/actions/act-runner.en-us.md | 27 +++++++++++++++++++++++++++ doc/usage/actions/act-runner.zh-cn.md | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/doc/usage/actions/act-runner.en-us.md b/doc/usage/actions/act-runner.en-us.md index b654fe2e..ddab4353 100644 --- a/doc/usage/actions/act-runner.en-us.md +++ b/doc/usage/actions/act-runner.en-us.md @@ -76,6 +76,12 @@ The default configuration is safe to use without any modification, so you can ju ./act_runner --config config.yaml [command] ``` +You could also generate config file with docker: + +```bash +docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml +``` + When you are using the docker image, you can specify the configuration file by using the `CONFIG_FILE` environment variable. Make sure that the file is mounted into the container as a volume: ```bash @@ -172,6 +178,27 @@ It is because the act runner will run jobs in docker containers, so it needs to As mentioned, you can remove it if you want to run jobs in the host directly. To be clear, the "host" actually means the container which is running the act runner now, instead of the host machine. +### Set up the runner using docker compose + +You could also set up the runner using the following `docker-compose.yml`: + +```yml +version: "3.8" +services: + runner: + image: gitea/act_runner:nightly + environment: + CONFIG_FILE: /config.yaml + GITEA_INSTANCE_URL: "${INSTANCE_URL}" + GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" + GITEA_RUNNER_NAME: "${RUNNER_NAME}" + GITEA_RUNNER_LABELS: "${RUNNER_LABELS}" + volumes: + - ./config.yaml:/config.yaml + - ./data:/data + - /var/run/docker.sock:/var/run/docker.sock +``` + ### Configuring cache when starting a Runner using docker image If you do not intend to use `actions/cache` in workflow, you can ignore this section. diff --git a/doc/usage/actions/act-runner.zh-cn.md b/doc/usage/actions/act-runner.zh-cn.md index 8d0899fe..fb202e30 100644 --- a/doc/usage/actions/act-runner.zh-cn.md +++ b/doc/usage/actions/act-runner.zh-cn.md @@ -76,6 +76,12 @@ docker pull gitea/act_runner:nightly # for the latest nightly build ./act_runner --config config.yaml [command] ``` +您亦可以如下使用 docker 创建配置文件: + +```bash +docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml +``` + 当使用Docker镜像时,可以使用`CONFIG_FILE`环境变量指定配置文件。确保将文件作为卷挂载到容器中: ```bash @@ -169,6 +175,27 @@ docker run \ 如前所述,如果要在主机上直接运行Job,可以将其移除。 需要明确的是,这里的 "主机" 实际上指的是当前运行 Act Runner的容器,而不是主机机器本身。 +### 使用 Docker compose 运行 Runner + +您亦可使用如下的 `docker-compose.yml`: + +```yml +version: "3.8" +services: + runner: + image: gitea/act_runner:nightly + environment: + CONFIG_FILE: /config.yaml + GITEA_INSTANCE_URL: "${INSTANCE_URL}" + GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" + GITEA_RUNNER_NAME: "${RUNNER_NAME}" + GITEA_RUNNER_LABELS: "${RUNNER_LABELS}" + volumes: + - ./config.yaml:/config.yaml + - ./data:/data + - /var/run/docker.sock:/var/run/docker.sock +``` + ### 当您使用 Docker 镜像启动 Runner,如何配置 Cache 如果你不打算在工作流中使用 `actions/cache`,你可以忽略本段。 From 90bdbfee99dfa06fed43af293ff3778a4709ed7c Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 16 Jun 2023 02:26:32 -0400 Subject: [PATCH 05/42] Add link to support page for commercial support (#25293) (#25297) Backport #25293 by @techknowlogick Co-authored-by: techknowlogick --- doc/help/support.en-us.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/help/support.en-us.md b/doc/help/support.en-us.md index eb0e1865..2b285ce6 100644 --- a/doc/help/support.en-us.md +++ b/doc/help/support.en-us.md @@ -17,6 +17,7 @@ menu: # Support Options +- [Paid Commercial Support](https://about.gitea.com/) - [Discord](https://discord.gg/Gitea) - [Discourse Forum](https://discourse.gitea.io/) From 6bbaae640f71f0e97e61988fd15ca40c5c0d93da Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 18 Jun 2023 11:48:06 -0400 Subject: [PATCH 06/42] Add Exoscale to installation on cloud provider docs (#25342) (#25346) Backport #25342 by @pmig We created a Gitea application for the [Exoscale Marketplace](https://www.exoscale.com/marketplace/listing/glasskube-gitea/) for easier installation on the European cloud provider. The installation is managed via the [Glasskube Kubernetes Operator](https://github.com/glasskube/operator). Signed-off-by: Philip Miglinci Co-authored-by: Philip Miglinci --- doc/installation/on-cloud-provider.en-us.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/installation/on-cloud-provider.en-us.md b/doc/installation/on-cloud-provider.en-us.md index 20ca812e..bf3bf4c3 100644 --- a/doc/installation/on-cloud-provider.en-us.md +++ b/doc/installation/on-cloud-provider.en-us.md @@ -56,3 +56,13 @@ To deploy Gitea to Linode, have a look at the [Linode Marketplace](https://www.l [alwaysdata](https://www.alwaysdata.com/) has Gitea as an app in their marketplace. To deploy Gitea to alwaysdata, have a look at the [alwaysdata Marketplace](https://www.alwaysdata.com/en/marketplace/gitea/). + +## Exoscale + +[Exoscale](https://www.exoscale.com/) provides Gitea managed by [Glasskube](https://glasskube.eu/) in their marketplace. + +Exoscale is a European cloud service provider. + +The package is maintained and update via the open source [Glasskube Kubernetes Operator](https://github.com/glasskube/operator). + +To deploy Gitea to Exoscale, have a look at the [Exoscale Marketplace](https://www.exoscale.com/marketplace/listing/glasskube-gitea/). From da53d8ee786cf32a16e0d4d3bdab4c00bdbfb2c2 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 20 Jun 2023 23:59:51 -0400 Subject: [PATCH 07/42] Use the new download domain replace the old (#25405) (#25409) Backport #25405 by @lunny As title. Co-authored-by: Lunny Xiao --- doc/administration/config-cheat-sheet.en-us.md | 2 +- doc/help/faq.zh-cn.md | 2 +- doc/installation/from-binary.fr-fr.md | 4 ++-- doc/installation/from-binary.zh-tw.md | 4 ++-- doc/installation/on-kubernetes.en-us.md | 2 +- doc/installation/on-kubernetes.zh-cn.md | 2 +- doc/installation/on-kubernetes.zh-tw.md | 2 +- doc/installation/upgrade-from-gogs.en-us.md | 8 ++++---- doc/installation/upgrade-from-gogs.fr-fr.md | 2 +- doc/installation/upgrade-from-gogs.zh-tw.md | 6 +++--- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/administration/config-cheat-sheet.en-us.md b/doc/administration/config-cheat-sheet.en-us.md index 7b94c7a4..64a35655 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/doc/administration/config-cheat-sheet.en-us.md @@ -1013,7 +1013,7 @@ Default templates for project boards: - `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED). - `ENABLE_SUCCESS_NOTICE`: **true**: Set to false to switch off success notices. - `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 +- `HTTP_ENDPOINT`: **https://dl.gitea.com/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`) diff --git a/doc/help/faq.zh-cn.md b/doc/help/faq.zh-cn.md index 34585345..6a63b453 100644 --- a/doc/help/faq.zh-cn.md +++ b/doc/help/faq.zh-cn.md @@ -31,7 +31,7 @@ menu: **注意:**此示例也适用于Docker镜像! -在我们的[下载页面](https://dl.gitea.io/gitea/)上,您会看到一个1.7目录,以及1.7.0、1.7.1、1.7.2、1.7.3、1.7.4、1.7.5和1.7.6的目录。 +在我们的[下载页面](https://dl.gitea.com/gitea/)上,您会看到一个1.7目录,以及1.7.0、1.7.1、1.7.2、1.7.3、1.7.4、1.7.5和1.7.6的目录。 1.7目录和1.7.0目录是**不同**的。1.7目录是在每个合并到[`release/v1.7`](https://github.com/go-gitea/gitea/tree/release/v1.7)分支的提交上构建的。 diff --git a/doc/installation/from-binary.fr-fr.md b/doc/installation/from-binary.fr-fr.md index f5273054..f3d31104 100644 --- a/doc/installation/from-binary.fr-fr.md +++ b/doc/installation/from-binary.fr-fr.md @@ -17,10 +17,10 @@ menu: # Installation avec le binaire pré-compilé -Tous les binaires sont livrés avec le support de SQLite, MySQL et PostgreSQL, et sont construits avec les ressources incorporées. Gardez à l'esprit que cela peut être différent pour les versions antérieures. L'installation basée sur nos binaires est assez simple, il suffit de choisir le fichier correspondant à votre plateforme à partir de la [page de téléchargement](https://dl.gitea.io/gitea). Copiez l'URL et remplacer l'URL dans les commandes suivantes par la nouvelle: +Tous les binaires sont livrés avec le support de SQLite, MySQL et PostgreSQL, et sont construits avec les ressources incorporées. Gardez à l'esprit que cela peut être différent pour les versions antérieures. L'installation basée sur nos binaires est assez simple, il suffit de choisir le fichier correspondant à votre plateforme à partir de la [page de téléchargement](https://dl.gitea.com/gitea). Copiez l'URL et remplacer l'URL dans les commandes suivantes par la nouvelle: ``` -wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 chmod +x gitea ``` diff --git a/doc/installation/from-binary.zh-tw.md b/doc/installation/from-binary.zh-tw.md index 858cee21..78db7977 100644 --- a/doc/installation/from-binary.zh-tw.md +++ b/doc/installation/from-binary.zh-tw.md @@ -17,10 +17,10 @@ menu: # 從執行檔安裝 -所有的執行檔皆支援 SQLite, MySQL and PostgreSQL,且所有檔案都已經包在執行檔內,這一點跟之前的版本有所不同。關於執行檔的安裝方式非常簡單,只要從[下載頁面](https://dl.gitea.io/gitea)選擇相對應平台,複製下載連結,使用底下指令就可以完成了: +所有的執行檔皆支援 SQLite, MySQL and PostgreSQL,且所有檔案都已經包在執行檔內,這一點跟之前的版本有所不同。關於執行檔的安裝方式非常簡單,只要從[下載頁面](https://dl.gitea.com/gitea)選擇相對應平台,複製下載連結,使用底下指令就可以完成了: ``` -wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 chmod +x gitea ``` diff --git a/doc/installation/on-kubernetes.en-us.md b/doc/installation/on-kubernetes.en-us.md index b46a61df..0847a3b8 100644 --- a/doc/installation/on-kubernetes.en-us.md +++ b/doc/installation/on-kubernetes.en-us.md @@ -22,7 +22,7 @@ Gitea provides a Helm Chart to allow for installation on kubernetes. A non-customized install can be done with: ``` -helm repo add gitea-charts https://dl.gitea.io/charts/ +helm repo add gitea-charts https://dl.gitea.com/charts/ helm install gitea gitea-charts/gitea ``` diff --git a/doc/installation/on-kubernetes.zh-cn.md b/doc/installation/on-kubernetes.zh-cn.md index f5e8f9f7..83647a2e 100644 --- a/doc/installation/on-kubernetes.zh-cn.md +++ b/doc/installation/on-kubernetes.zh-cn.md @@ -22,7 +22,7 @@ Gitea 已经提供了便于在 Kubernetes 云原生环境中安装所需的 Helm 默认安装指令为: ```bash -helm repo add gitea https://dl.gitea.io/charts +helm repo add gitea https://dl.gitea.com/charts helm repo update helm install gitea gitea/gitea ``` diff --git a/doc/installation/on-kubernetes.zh-tw.md b/doc/installation/on-kubernetes.zh-tw.md index 51446911..28dfbda8 100644 --- a/doc/installation/on-kubernetes.zh-tw.md +++ b/doc/installation/on-kubernetes.zh-tw.md @@ -22,7 +22,7 @@ Gitea 提供 Helm Chart 用來安裝於 kubernetes。 非自訂安裝可使用下列指令: ``` -helm repo add gitea-charts https://dl.gitea.io/charts/ +helm repo add gitea-charts https://dl.gitea.com/charts/ helm install gitea gitea-charts/gitea ``` diff --git a/doc/installation/upgrade-from-gogs.en-us.md b/doc/installation/upgrade-from-gogs.en-us.md index 2e149c6a..fa545ee0 100644 --- a/doc/installation/upgrade-from-gogs.en-us.md +++ b/doc/installation/upgrade-from-gogs.en-us.md @@ -27,7 +27,7 @@ There are some basic steps to follow. On a Linux system run as the Gogs user: * Create a Gogs backup with `gogs backup`. This creates `gogs-backup-[timestamp].zip` file containing all important Gogs data. You would need it if you wanted to move to the `gogs` back later. -* Download the file matching the destination platform from the [downloads page](https://dl.gitea.io/gitea/). +* Download the file matching the destination platform from the [downloads page](https://dl.gitea.com/gitea/). It should be `1.0.x` version. Migrating from `gogs` to any other version is impossible. * Put the binary at the desired install location. * Copy `gogs/custom/conf/app.ini` to `gitea/custom/conf/app.ini`. @@ -79,11 +79,11 @@ There are some basic steps to follow. On a Linux system run as the Gogs user: After successful migration from `gogs` to `gitea 1.0.x`, it is possible to upgrade `gitea` to a modern version in a two steps process. -Upgrade to [`gitea 1.6.4`](https://dl.gitea.io/gitea/1.6.4/) first. Download the file matching -the destination platform from the [downloads page](https://dl.gitea.io/gitea/1.6.4/) and replace the binary. +Upgrade to [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/) first. Download the file matching +the destination platform from the [downloads page](https://dl.gitea.com/gitea/1.6.4/) and replace the binary. Run Gitea at least once and check that everything works as expected. -Then repeat the procedure, but this time using the [latest release](https://dl.gitea.io/gitea/{{< version >}}/). +Then repeat the procedure, but this time using the [latest release](https://dl.gitea.com/gitea/{{< version >}}/). ## Upgrading from a more recent version of Gogs diff --git a/doc/installation/upgrade-from-gogs.fr-fr.md b/doc/installation/upgrade-from-gogs.fr-fr.md index 9a46562f..9d287d11 100644 --- a/doc/installation/upgrade-from-gogs.fr-fr.md +++ b/doc/installation/upgrade-from-gogs.fr-fr.md @@ -22,7 +22,7 @@ menu: Veuillez suivre les étapes ci-dessous. Sur Unix, toute les commandes s'exécutent en tant que l'utilisateur utilisé pour votre installation de Gogs : * Crééer une sauvegarde de Gogs avec la commande `gogs dump`. Le fichier nouvellement créé `gogs-dump-[timestamp].zip` contient toutes les données de votre instance de Gogs. -* Téléchargez le fichier correspondant à votre plateforme à partir de la [page de téléchargements](https://dl.gitea.io/gitea). +* Téléchargez le fichier correspondant à votre plateforme à partir de la [page de téléchargements](https://dl.gitea.com/gitea). * Mettez la binaire dans le répertoire d'installation souhaité. * Copiez le fichier `gogs/custom/conf/app.ini` vers `gitea/custom/conf/app.ini`. * Si vous avez personnalisé les répertoires `templates, public` dans `gogs/custom/`, copiez-les vers `gitea/custom/`. diff --git a/doc/installation/upgrade-from-gogs.zh-tw.md b/doc/installation/upgrade-from-gogs.zh-tw.md index 9812efaf..46442845 100644 --- a/doc/installation/upgrade-from-gogs.zh-tw.md +++ b/doc/installation/upgrade-from-gogs.zh-tw.md @@ -27,7 +27,7 @@ menu: - 使用 `gogs backup` 建立 Gogs 的備份。這會建立檔案 `gogs-backup-[timestamp].zip` 包含所有重要的 Gogs 資料。 如果稍後您要恢復到 `gogs` 時會用到它。 -- 從[下載頁](https://dl.gitea.io/gitea/)下載對應您平臺的檔案。請下載 `1.0.x` 版,從 `gogs` 遷移到其它版本是不可行的。 +- 從[下載頁](https://dl.gitea.com/gitea/)下載對應您平臺的檔案。請下載 `1.0.x` 版,從 `gogs` 遷移到其它版本是不可行的。 - 將二進位檔放到適當的安裝位置。 - 複製 `gogs/custom/conf/app.ini` 到 `gitea/custom/conf/app.ini`。 - 從 `gogs/custom/` 複製自訂 `templates, public` 到 `gitea/custom/`。 @@ -77,10 +77,10 @@ menu: 成功從 `gogs` 升級到 `gitea 1.0.x` 後再用 2 個步驟即可升級到最新版的 `gitea`。 -請先升級到 [`gitea 1.6.4`](https://dl.gitea.io/gitea/1.6.4/),先從[下載頁](https://dl.gitea.io/gitea/1.6.4/)下載 +請先升級到 [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/),先從[下載頁](https://dl.gitea.com/gitea/1.6.4/)下載 您平臺的二進位檔取代既有的。至少執行一次 Gitea 並確認一切符合預期。 -接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.io/gitea/{{< version >}}/)。 +接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.com/gitea/{{< version >}}/)。 ## 從更新版本的 Gogs 升級 From 4b29c1bbfacd7306c0c43fb902ba090344c1cfe8 Mon Sep 17 00:00:00 2001 From: lonix1 <40320097+lonix1@users.noreply.github.com> Date: Mon, 26 Jun 2023 03:33:34 +0200 Subject: [PATCH 08/42] Document creating an API key from the CLI (#25504) Related to https://github.com/go-gitea/gitea/issues/25503 --------- Co-authored-by: delvh --- doc/administration/command-line.en-us.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/administration/command-line.en-us.md b/doc/administration/command-line.en-us.md index 37ba0c04..d7e74ee2 100644 --- a/doc/administration/command-line.en-us.md +++ b/doc/administration/command-line.en-us.md @@ -108,6 +108,14 @@ Admin operations: - `--all`, `-A`: Force a password change for all users - `--exclude username`, `-e username`: Exclude the given user. Can be set multiple times. - `--unset`: Revoke forced password change for the given users + - `generate-access-token`: + - Options: + - `--username value`, `-u value`: Username. Required. + - `--token-name value`, `-t value`: Token name. Required. + - `--scopes value`: Comma-separated list of scopes. Scopes follow the format `[read|write]:` or `all` where `` is one of the available visual groups you can see when opening the API page showing the available routes (for example `repo`). + - Examples: + - `gitea admin user generate-access-token --username myname --token-name mytoken` + - `gitea admin user generate-access-token --help` - `regenerate` - Options: - `hooks`: Regenerate Git Hooks for all repositories From 5026aac7fcc365e04ae33a267f14720c410f1784 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 29 Jun 2023 08:51:46 -0400 Subject: [PATCH 09/42] Add documentation about supported workflow trigger events (#25582) (#25589) Backport #25582 by @Zettat123 Right now Gitea doesn't support all [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows). This PR lists the supported events to help users write workflow files. Co-authored-by: Zettat123 --- doc/usage/actions/faq.en-us.md | 20 ++++++++++++++++++++ doc/usage/actions/faq.zh-cn.md | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/doc/usage/actions/faq.en-us.md b/doc/usage/actions/faq.en-us.md index 194c297a..69a4cf3e 100644 --- a/doc/usage/actions/faq.en-us.md +++ b/doc/usage/actions/faq.en-us.md @@ -164,3 +164,23 @@ Although we would like to provide more options, our limited manpower means that However, both Gitea and act runner are completely open source, so anyone can create a new/better implementation. We support your choice, no matter how you decide. In case you fork act runner to create your own version: Please contribute the changes back if you can and if you think your changes will help others as well. + +## What workflow trigger events does Gitea support? + +All events listed in this table are supported events and are compatible with GitHub. +For events supported only by GitHub, see GitHub's [documentation](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows). + +| trigger event | activity types | +|-----------------------------|--------------------------------------------------------------------------------------------------------------------------| +| create | not applicable | +| delete | not applicable | +| fork | not applicable | +| gollum | not applicable | +| push | not applicable | +| issues | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `milestoned`, `demilestoned`, `labeled`, `unlabeled` | +| issue_comment | `created`, `edited`, `deleted` | +| pull_request | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `synchronize`, `labeled`, `unlabeled` | +| pull_request_review | `submitted`, `edited` | +| pull_request_review_comment | `created`, `edited` | +| release | `published`, `edited` | +| registry_package | `published` | diff --git a/doc/usage/actions/faq.zh-cn.md b/doc/usage/actions/faq.zh-cn.md index c990c04f..ae6edd06 100644 --- a/doc/usage/actions/faq.zh-cn.md +++ b/doc/usage/actions/faq.zh-cn.md @@ -164,3 +164,23 @@ defaults: 然而,无论您如何决定,Gitea 和act runner都是完全开源的,所以任何人都可以创建一个新的/更好的实现。 我们支持您的选择,无论您如何决定。 如果您选择分支act runner来创建自己的版本,请在您认为您的更改对其他人也有帮助的情况下贡献这些更改。 + +## Gitea 支持哪些工作流触发事件? + +表格中列出的所有事件都是支持的,并且与 GitHub 兼容。 +对于仅 GitHub 支持的事件,请参阅 GitHub 的[文档](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)。 + +| 触发事件 | 活动类型 | +|-----------------------------|--------------------------------------------------------------------------------------------------------------------------| +| create | 不适用 | +| delete | 不适用 | +| fork | 不适用 | +| gollum | 不适用 | +| push | 不适用 | +| issues | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `milestoned`, `demilestoned`, `labeled`, `unlabeled` | +| issue_comment | `created`, `edited`, `deleted` | +| pull_request | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `synchronize`, `labeled`, `unlabeled` | +| pull_request_review | `submitted`, `edited` | +| pull_request_review_comment | `created`, `edited` | +| release | `published`, `edited` | +| registry_package | `published` | From 38f11e8f48172dd2fe9a4b2e20e82457863286bb Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 30 Jun 2023 03:53:00 -0400 Subject: [PATCH 10/42] Restrict `[actions].DEFAULT_ACTIONS_URL` to only `github` or `self` (#25581) (#25604) Backport #25581 by @wolfogre Resolve #24789 ## :warning: BREAKING :warning: Before this, `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. But now, `DEFAULT_ACTIONS_URL` supports only `github`(`https://github.com`) or `self`(the root url of current Gitea instance), and the default value is `github`. If it has configured with a URL, an error log will be displayed and it will fallback to `github`. Actually, what we really want to do is always make it `https://github.com`, however, this may not be acceptable for some instances of internal use, so there's extra support for `self`, but no more, even `https://gitea.com`. Please note that `uses: https://xxx/yyy/zzz` always works and it does exactly what it is supposed to do. Although it's breaking, I belive it should be backported to `v1.20` due to some security issues. Follow-up on the runner side: - https://gitea.com/gitea/act_runner/pulls/262 - https://gitea.com/gitea/act/pulls/70 Co-authored-by: Jason Song --- .../config-cheat-sheet.en-us.md | 39 ++++++------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/doc/administration/config-cheat-sheet.en-us.md b/doc/administration/config-cheat-sheet.en-us.md index 64a35655..417f617c 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/doc/administration/config-cheat-sheet.en-us.md @@ -1374,39 +1374,22 @@ PROXY_HOSTS = *.github.com ## Actions (`actions`) - `ENABLED`: **false**: Enable/Disable actions capabilities -- `DEFAULT_ACTIONS_URL`: **https://gitea.com**: Default address to get action plugins, e.g. the default value means downloading from "" for "uses: actions/checkout@v3" +- `DEFAULT_ACTIONS_URL`: **github**: Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance. - `STORAGE_TYPE`: **local**: Storage type for actions logs, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]` - `MINIO_BASE_PATH`: **actions_log/**: Minio base path on the bucket only available when STORAGE_TYPE is `minio` -`DEFAULT_ACTIONS_URL` indicates where should we find the relative path action plugin. i.e. when use an action in a workflow file like +`DEFAULT_ACTIONS_URL` indicates where the Gitea Actions runners should find the actions with relative path. +For example, `uses: actions/checkout@v3` means `https://github.com/actions/checkout@v3` since the value of `DEFAULT_ACTIONS_URL` is `github`. +And it can be changed to `self` to make it `root_url_of_your_gitea/actions/checkout@v3`. -```yaml -name: versions -on: - push: - branches: - - main - - releases/* -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 -``` +Please note that using `self` is not recommended for most cases, as it could make names globally ambiguous. +Additionally, it requires you to mirror all the actions you need to your Gitea instance, which may not be worth it. +Therefore, please use `self` only if you understand what you are doing. -Now we need to know how to get actions/checkout, this configuration is the default git server to get it. That means we will get the repository via git clone ${DEFAULT_ACTIONS_URL}/actions/checkout and fetch tag v3. - -To help people who don't want to mirror these actions in their git instances, the default value is https://gitea.com -To help people run actions totally in their network, they can change the value and copy all necessary action repositories into their git server. - -Of course we should support the form in future PRs like - -```yaml -steps: - - uses: gitea.com/actions/checkout@v3 -``` - -although Github don't support this form. +In earlier versions (<= 1.19), `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. +However, later updates removed those options, and now the only options are `github` and `self`, with the default value being `github`. +However, if you want to use actions from other git server, you can use a complete URL in `uses` field, it's supported by Gitea (but not GitHub). +Like `uses: https://gitea.com/actions/checkout@v3` or `uses: http://your-git-server/actions/checkout@v3`. ## Other (`other`) From 388e6dbe9f3ea1a4705855b62ee886eeaba5021e Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 9 Jul 2023 03:45:42 -0400 Subject: [PATCH 11/42] docs: rootless docker ssh's default port is 2222 (#25771) (#25772) Backport #25771 by @leavesster --- according `docker/rootless/usr/local/bin/docker-setup.sh` , in rootless docker setup, ssh port is 2222. and mysql database case should port same as PostgreSQL port Co-authored-by: leavesster <11785335+leavesster@users.noreply.github.com> --- doc/installation/with-docker-rootless.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installation/with-docker-rootless.en-us.md b/doc/installation/with-docker-rootless.en-us.md index b8c76438..b8b40fcb 100644 --- a/doc/installation/with-docker-rootless.en-us.md +++ b/doc/installation/with-docker-rootless.en-us.md @@ -119,7 +119,7 @@ services: - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - - "222:22" + - "2222:2222" + depends_on: + - db + From a120e3fc5a529ae7d3a5af739b27643a77f30bf1 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 10 Jul 2023 19:51:05 +0800 Subject: [PATCH 12/42] Make "install page" respect environment config (#25648) (#25799) Backport #25648 Replace #25580 Fix #19453 The problem was: when users set "GITEA__XXX__YYY" , the "install page" doesn't respect it. So, to make the result consistent and avoid surprising end users, now the "install page" also writes the environment variables to the config file. And, to make things clear, there are enough messages on the UI to tell users what will happen. There are some necessary/related changes to `environment-to-ini.go`: * The "--clear" flag is removed and it was incorrectly written there. The "clear" operation should be done if INSTALL_LOCK=true * The "--prefix" flag is removed because it's never used, never documented and it only causes inconsistent behavior. The only conflict during backport is "ui divider" in templates/install.tmpl --- doc/installation/with-docker-rootless.en-us.md | 2 +- doc/installation/with-docker.en-us.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/installation/with-docker-rootless.en-us.md b/doc/installation/with-docker-rootless.en-us.md index b8b40fcb..5aa4e46e 100644 --- a/doc/installation/with-docker-rootless.en-us.md +++ b/doc/installation/with-docker-rootless.en-us.md @@ -288,7 +288,7 @@ docker-compose up -d In addition to the environment variables above, any settings in `app.ini` can be set or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. -These settings are applied each time the docker container starts. +These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. Full information [here](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini). These environment variables can be passed to the docker container in `docker-compose.yml`. diff --git a/doc/installation/with-docker.en-us.md b/doc/installation/with-docker.en-us.md index e70a6ab1..a7a57529 100644 --- a/doc/installation/with-docker.en-us.md +++ b/doc/installation/with-docker.en-us.md @@ -289,7 +289,7 @@ docker-compose up -d In addition to the environment variables above, any settings in `app.ini` can be set or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. -These settings are applied each time the docker container starts. +These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. Full information [here](https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini). These environment variables can be passed to the docker container in `docker-compose.yml`. From 2312952c2aa4e39756bced0e2e90a477010b03f9 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 19 Jul 2023 05:48:54 -0400 Subject: [PATCH 13/42] Update path related documents (#25417) (#25982) Backport #25417 by @wxiaoguang Update WorkPath/WORK_PATH related documents, remove out-dated information. Remove "StaticRootPath" on the admin config display page, because few end user really need it, it only causes misconfiguration. ![image](https://github.com/go-gitea/gitea/assets/2114189/8095afa4-da76-436b-9e89-2a92c229c01d) Co-authored-by: wxiaoguang --- doc/administration/backup-and-restore.en-us.md | 14 ++------------ doc/administration/command-line.en-us.md | 6 +++--- doc/administration/config-cheat-sheet.en-us.md | 16 ++++++++-------- doc/administration/customizing-gitea.en-us.md | 2 +- .../environment-variables.en-us.md | 5 +---- doc/help/faq.en-us.md | 8 +++----- 6 files changed, 18 insertions(+), 33 deletions(-) diff --git a/doc/administration/backup-and-restore.en-us.md b/doc/administration/backup-and-restore.en-us.md index 7dee038b..5a722f49 100644 --- a/doc/administration/backup-and-restore.en-us.md +++ b/doc/administration/backup-and-restore.en-us.md @@ -46,9 +46,9 @@ directory. There should be some output similar to the following: Inside the `gitea-dump-1482906742.zip` file, will be the following: -- `app.ini` - Optional copy of configuration file if originally stored outside of the default `custom/` directory +- `app.ini` - Optional copy of configuration file if originally stored outside the default `custom/` directory - `custom` - All config or customization files in `custom/`. -- `data` - Data directory in , except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, SQLite file if you are using SQLite. +- `data` - Data directory (APP_DATA_PATH), except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, SQLite file if you are using SQLite. - `gitea-db.sql` - SQL dump of database - `gitea-repo.zip` - Complete copy of the repository directory. - `log/` - Various logs. They are not needed for a recovery or migration. @@ -139,16 +139,6 @@ chown -R git:git /data The default user in the gitea container is `git` (1000:1000). Please replace `2a83b293548e` with your gitea container id or name. -These are the default paths used in the container: - -```text -DEFAULT CONFIGURATION: - CustomPath: /data/gitea (GITEA_CUSTOM) - CustomConf: /data/gitea/conf/app.ini - AppPath: /usr/local/bin/gitea - AppWorkPath: /usr/local/bin -``` - ### Using Docker-rootless (`restore`) The restore workflow in Docker-rootless containers differs only in the directories to be used: diff --git a/doc/administration/command-line.en-us.md b/doc/administration/command-line.en-us.md index d7e74ee2..2ac74896 100644 --- a/doc/administration/command-line.en-us.md +++ b/doc/administration/command-line.en-us.md @@ -31,9 +31,9 @@ All global options can be placed at the command level. - `--help`, `-h`: Show help text and exit. Optional. - `--version`, `-v`: Show version and exit. Optional. (example: `Gitea version 1.1.0+218-g7b907ed built with: bindata, sqlite`). -- `--custom-path path`, `-C path`: Location of the Gitea custom folder. Optional. (default: `AppWorkPath`/custom or `$GITEA_CUSTOM`). -- `--config path`, `-c path`: Gitea configuration file path. Optional. (default: `custom`/conf/app.ini). -- `--work-path path`, `-w path`: Gitea `AppWorkPath`. Optional. (default: LOCATION_OF_GITEA_BINARY or `$GITEA_WORK_DIR`) +- `--work-path path`, `-w path`: Gitea's work path. Optional. (default: the binary's path or `$GITEA_WORK_DIR`) +- `--custom-path path`, `-C path`: Gitea's custom folder path. Optional. (default: `WorkPath`/custom or `$GITEA_CUSTOM`). +- `--config path`, `-c path`: Gitea configuration file path. Optional. (default: `CustomPath`/conf/app.ini). NB: The defaults custom-path, config and work-path can also be changed at build time (if preferred). diff --git a/doc/administration/config-cheat-sheet.en-us.md b/doc/administration/config-cheat-sheet.en-us.md index 417f617c..dd59a4b9 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/doc/administration/config-cheat-sheet.en-us.md @@ -44,28 +44,27 @@ reported as part of the default configuration when running `gitea --help` or on - _`AppPath`_: This is the absolute path of the running gitea binary. - _`AppWorkPath`_: This refers to "working path" of the `gitea` binary. It is determined by using the first set thing in the following hierarchy: + - The `WORK_PATH` option in `app.ini` - The `--work-path` flag passed to the binary - The environment variable `$GITEA_WORK_DIR` - A built-in value set at build time (see building from source) - - Otherwise it defaults to the directory of the _`AppPath`_ - - If any of the above are relative paths then they are made absolute against -the directory of the _`AppPath`_ + - Otherwise, it defaults to the directory of the _`AppPath`_ + - If any of the above are relative paths then they are made absolute against the directory of the _`AppPath`_ - _`CustomPath`_: This is the base directory for custom templates and other options. It is determined by using the first set thing in the following hierarchy: - The `--custom-path` flag passed to the binary - The environment variable `$GITEA_CUSTOM` - A built-in value set at build time (see building from source) - - Otherwise it defaults to _`AppWorkPath`_`/custom` + - Otherwise, it defaults to _`AppWorkPath`_`/custom` - If any of the above are relative paths then they are made absolute against the the directory of the _`AppWorkPath`_ - _`CustomConf`_: This is the path to the `app.ini` file. - The `--config` flag passed to the binary - A built-in value set at build time (see building from source) - - Otherwise it defaults to _`CustomPath`_`/conf/app.ini` - - If any of the above are relative paths then they are made absolute against the -the directory of the _`CustomPath`_ + - Otherwise, it defaults to _`CustomPath`_`/conf/app.ini` + - If any of the above are relative paths then they are made absolute against the directory of the _`CustomPath`_ -In addition there is _`StaticRootPath`_ which can be set as a built-in at build time, but will otherwise default to _`AppWorkPath`_ +In addition, there is _`StaticRootPath`_ which can be set as a built-in at build time, but will otherwise default to _`AppWorkPath`_ ## Overall (`DEFAULT`) @@ -74,6 +73,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build This should be a dedicated system (non-user) account. Setting this incorrectly will cause Gitea to not start. - `RUN_MODE`: **prod**: Application run mode, affects performance and debugging: `dev` or `prod`, default is `prod`. Mode `dev` makes Gitea easier to develop and debug, values other than `dev` are treated as `prod` which is for production use. +- `WORK_PATH`: **_the-work-path_**: The working directory, see the comment of AppWorkPath above. ## Repository (`repository`) diff --git a/doc/administration/customizing-gitea.en-us.md b/doc/administration/customizing-gitea.en-us.md index 4c8b1c90..8ab0d355 100644 --- a/doc/administration/customizing-gitea.en-us.md +++ b/doc/administration/customizing-gitea.en-us.md @@ -18,7 +18,7 @@ menu: # Customizing Gitea Customizing Gitea is typically done using the `CustomPath` folder - by default this is -the `custom` folder from the running directory, but may be different if your build has +the `custom` folder from the working directory (WorkPath), but may be different if your build has set this differently. This is the central place to override configuration settings, templates, etc. You can check the `CustomPath` using `gitea help`. You can also find the path on the _Configuration_ tab in the _Site Administration_ page. You can override diff --git a/doc/administration/environment-variables.en-us.md b/doc/administration/environment-variables.en-us.md index 92dbeb80..261d1bea 100644 --- a/doc/administration/environment-variables.en-us.md +++ b/doc/administration/environment-variables.en-us.md @@ -43,10 +43,7 @@ For documentation about each of the variables available, refer to the ## Gitea files - `GITEA_WORK_DIR`: Absolute path of working directory. -- `GITEA_CUSTOM`: Gitea uses `GITEA_WORK_DIR`/custom folder by default. Use this variable - to change _custom_ directory. -- `GOGS_WORK_DIR`: Deprecated, use `GITEA_WORK_DIR` -- `GOGS_CUSTOM`: Deprecated, use `GITEA_CUSTOM` +- `GITEA_CUSTOM`: Gitea uses `WorkPath`/custom folder by default. Use this variable to change _custom_ directory. ## Operating system specifics diff --git a/doc/help/faq.en-us.md b/doc/help/faq.en-us.md index f609b6c8..f67c5a05 100644 --- a/doc/help/faq.en-us.md +++ b/doc/help/faq.en-us.md @@ -59,11 +59,12 @@ https://github.com/loganinak/MigrateGitlabToGogs ## Where does Gitea store what file - _`AppWorkPath`_ - - The `--work-path` flag + - The `WORK_PATH` option in `app.ini` + - Else the `--work-path` flag - Else Environment variable `GITEA_WORK_DIR` - Else a built-in value set at build time - Else the directory that contains the Gitea binary -- `%(APP_DATA_PATH)` (default for database, indexers, etc.) +- `AppDataPath` (default for database, indexers, etc.) - `APP_DATA_PATH` from `app.ini` - Else _`AppWorkPath`_`/data` - _`CustomPath`_ (custom templates) @@ -112,9 +113,6 @@ Gitea's custom templates must be added to the correct location or Gitea will not The correct path for the template(s) will be relative to the `CustomPath` 1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration - - 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/administration/customizing-gitea.en-us.md" >}}) page to add your template to the correct location. From a9d45b3c0140e742341afaee369c4b2a74656136 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 20 Jul 2023 09:03:40 -0400 Subject: [PATCH 14/42] Correctly refer to dev tags as nightly in the docker docs (#26004) (#26019) Backport #26004 by @jolheiser As title, `dev` tags are no longer used since we switched to `nightly` Signed-off-by: jolheiser --- doc/installation/with-docker-rootless.en-us.md | 2 +- doc/installation/with-docker.en-us.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/installation/with-docker-rootless.en-us.md b/doc/installation/with-docker-rootless.en-us.md index 5aa4e46e..6c2326b7 100644 --- a/doc/installation/with-docker-rootless.en-us.md +++ b/doc/installation/with-docker-rootless.en-us.md @@ -67,7 +67,7 @@ sudo chown 1000:1000 config/ data/ > If you don't give the volume correct permissions, the container may not start. -For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`, but if you'd like to use the latest development version then `:dev-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-dev-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-dev-rootless`) +For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) ## Custom port diff --git a/doc/installation/with-docker.en-us.md b/doc/installation/with-docker.en-us.md index a7a57529..5f49876b 100644 --- a/doc/installation/with-docker.en-us.md +++ b/doc/installation/with-docker.en-us.md @@ -36,7 +36,7 @@ image as a service. Since there is no database available, one can be initialized Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`. Note that the volume should be owned by the user/group with the UID/GID specified in the config file. If you don't give the volume correct permissions, the container may not start. -For a stable release you can use `:latest`, `:1` or specify a certain release like `:{{< version >}}`, but if you'd like to use the latest development version of Gitea then you could use the `:dev` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-dev` tag, where x is the minor version of Gitea. (e.g. `:1.16-dev`) +For a stable release you can use `:latest`, `:1` or specify a certain release like `:{{< version >}}`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) ```yaml version: "3" From 3f7a6a74ed1523c0cd3c70ef3aebc95f9fc511f4 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 20 Jul 2023 21:15:47 -0400 Subject: [PATCH 15/42] RPM Registry: Show zypper commands for SUSE based distros as well (#25981) (#26020) Backport #25981 by @asdil12 After RPM is supported with https://github.com/go-gitea/gitea/pull/23380 let's show the user how to add the repo and install the RPM via all common package managers. Co-authored-by: Dominik Heidler --- doc/usage/packages/overview.en-us.md | 2 +- doc/usage/packages/overview.zh-cn.md | 2 +- doc/usage/packages/rpm.en-us.md | 4 ++-- doc/usage/packages/rpm.zh-cn.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/usage/packages/overview.en-us.md b/doc/usage/packages/overview.en-us.md index 944505a0..bf33ea62 100644 --- a/doc/usage/packages/overview.en-us.md +++ b/doc/usage/packages/overview.en-us.md @@ -44,7 +44,7 @@ The following package managers are currently supported: | [NuGet]({{< relref "doc/usage/packages/nuget.en-us.md" >}}) | .NET | `nuget` | | [Pub]({{< relref "doc/usage/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` | | [PyPI]({{< relref "doc/usage/packages/pypi.en-us.md" >}}) | Python | `pip`, `twine` | -| [RPM]({{< relref "doc/usage/packages/rpm.en-us.md" >}}) | - | `yum`, `dnf` | +| [RPM]({{< relref "doc/usage/packages/rpm.en-us.md" >}}) | - | `yum`, `dnf`, `zypper` | | [RubyGems]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Ruby | `gem`, `Bundler` | | [Swift]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Swift | `swift` | | [Vagrant]({{< relref "doc/usage/packages/vagrant.en-us.md" >}}) | - | `vagrant` | diff --git a/doc/usage/packages/overview.zh-cn.md b/doc/usage/packages/overview.zh-cn.md index 70851fa2..9d24a733 100644 --- a/doc/usage/packages/overview.zh-cn.md +++ b/doc/usage/packages/overview.zh-cn.md @@ -44,7 +44,7 @@ menu: | [NuGet]({{< relref "doc/usage/packages/nuget.zh-cn.md" >}}) | .NET | `nuget` | | [Pub]({{< relref "doc/usage/packages/pub.zh-cn.md" >}}) | Dart | `dart`, `flutter` | | [PyPI]({{< relref "doc/usage/packages/pypi.zh-cn.md" >}}) | Python | `pip`, `twine` | -| [RPM]({{< relref "doc/usage/packages/rpm.zh-cn.md" >}}) | - | `yum`, `dnf` | +| [RPM]({{< relref "doc/usage/packages/rpm.zh-cn.md" >}}) | - | `yum`, `dnf`, `zypper` | | [RubyGems]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Ruby | `gem`, `Bundler` | | [Swift]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Swift | `swift` | | [Vagrant]({{< relref "doc/usage/packages/vagrant.zh-cn.md" >}}) | - | `vagrant` | diff --git a/doc/usage/packages/rpm.en-us.md b/doc/usage/packages/rpm.en-us.md index d4ff727a..7a258f5c 100644 --- a/doc/usage/packages/rpm.en-us.md +++ b/doc/usage/packages/rpm.en-us.md @@ -22,7 +22,7 @@ Publish [RPM](https://rpm.org/) packages for your user or organization. ## Requirements -To work with the RPM registry, you need to use a package manager like `yum` or `dnf` to consume packages. +To work with the RPM registry, you need to use a package manager like `yum`, `dnf` or `zypper` to consume packages. The following examples use `dnf`. @@ -79,7 +79,7 @@ The server responds with the following HTTP Status codes. ## Delete a package -To delete a Debian package perform a HTTP DELETE operation. This will delete the package version too if there is no file left. +To delete an RPM package perform a HTTP DELETE operation. This will delete the package version too if there is no file left. ``` DELETE https://gitea.example.com/api/packages/{owner}/rpm/{package_name}/{package_version}/{architecture} diff --git a/doc/usage/packages/rpm.zh-cn.md b/doc/usage/packages/rpm.zh-cn.md index 405e141a..f76273e5 100644 --- a/doc/usage/packages/rpm.zh-cn.md +++ b/doc/usage/packages/rpm.zh-cn.md @@ -22,7 +22,7 @@ menu: ## 要求 -要使用RPM注册表,您需要使用像 `yum` 或 `dnf` 这样的软件包管理器来消费软件包。 +要使用RPM注册表,您需要使用像 `yum`, `dnf` 或 `zypper` 这样的软件包管理器来消费软件包。 以下示例使用 `dnf`。 From b7923b979f7b53e36d13a3c35de2a2da294d6899 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 25 Jul 2023 12:32:39 -0400 Subject: [PATCH 16/42] added ssh mirror workaround description (#26096) (#26136) Backport #26096 by @thigg related #1635 #18159 This will probably be obsolete at some point, but it should not break anything and it may help some users Co-authored-by: thigg --- doc/usage/repo-mirror.en-us.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/usage/repo-mirror.en-us.md b/doc/usage/repo-mirror.en-us.md index 5e2b5c32..157b6c12 100644 --- a/doc/usage/repo-mirror.en-us.md +++ b/doc/usage/repo-mirror.en-us.md @@ -92,3 +92,16 @@ To set up a mirror from Gitea to Bitbucket, you need to follow these steps: 4. Select **Add Push Mirror** to save the configuration. The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button. + +### Mirror an existing ssh repository + +Currently gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your gitea repository that pushes manually. + +1. Make sure the user running gitea has access to the git repo you are trying to mirror to from shell. +2. On the Webinterface at the repository settings > git hooks add a post-receive hook for the mirror. I.e. + +``` +#!/usr/bin/env bash +git push --mirror --quiet git@github.com:username/repository.git &>/dev/null & +echo "GitHub mirror initiated .." +``` From e1991ac654b8c3d8adac101b75cb11146d7ef869 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 25 Jul 2023 21:00:14 -0500 Subject: [PATCH 17/42] Docusaurus-ify 1.20 (#26052) See https://github.com/go-gitea/gitea/pull/26051 --------- Signed-off-by: jolheiser Co-authored-by: JonRB <4564448+eeyrjmr@users.noreply.github.com> --- doc/actions.en-us.md => actions.en-us.md | 4 +- ...ration.en-us.md => administration.en-us.md | 4 +- ...ration.fr-fr.md => administration.fr-fr.md | 4 +- ...ration.zh-cn.md => administration.zh-cn.md | 4 +- ...ration.zh-tw.md => administration.zh-tw.md | 4 +- .../_index.en-us.md | 0 .../_index.zh-cn.md | 0 .../_index.zh-tw.md | 0 .../adding-legal-pages.en-us.md | 4 +- .../adding-legal-pages.zh-cn.md | 4 +- .../backup-and-restore.en-us.md | 8 +- .../backup-and-restore.zh-cn.md | 4 +- .../backup-and-restore.zh-tw.md | 4 +- .../cmd-embedded.en-us.md | 12 +- .../cmd-embedded.zh-cn.md | 12 +- .../command-line.en-us.md | 8 +- .../command-line.zh-cn.md | 8 +- .../config-cheat-sheet.en-us.md | 116 +++++++++--------- .../config-cheat-sheet.zh-cn.md | 18 ++- .../customizing-gitea.en-us.md | 12 +- .../customizing-gitea.zh-cn.md | 4 +- .../email-setup.en-us.md | 10 +- .../email-setup.zh-cn.md | 8 +- .../environment-variables.en-us.md | 8 +- .../environment-variables.zh-cn.md | 4 +- .../external-renderers.en-us.md | 10 +- .../external-renderers.zh-cn.md | 12 +- .../fail2ban-setup.en-us.md | 4 +- .../fail2ban-setup.zh-cn.md | 4 +- .../git-lfs-support.en-us.md | 4 +- .../git-lfs-support.zh-cn.md | 4 +- .../https-support.en-us.md | 10 +- .../https-support.zh-cn.md | 10 +- .../logging-config.en-us.md | 12 +- .../logging-config.zh-cn.md | 12 +- .../mail-templates.en-us.md | 8 +- .../mail-templates.zh-cn.md | 8 +- .../repo-indexer.en-us.md | 8 +- .../repo-indexer.zh-cn.md | 8 +- .../reverse-proxies.en-us.md | 8 +- .../reverse-proxies.zh-cn.md | 8 +- .../search-engines-indexation.en-us.md | 6 +- .../search-engines-indexation.zh-cn.md | 6 +- .../signing.en-us.md | 8 +- .../signing.zh-cn.md | 8 +- ...ributing.en-us.md => contributing.en-us.md | 4 +- ...ributing.fr-fr.md => contributing.fr-fr.md | 4 +- ...ributing.zh-tw.md => contributing.zh-tw.md | 4 +- .../_index.de-de.md | 0 .../_index.en-us.md | 0 .../_index.zh-cn.md | 0 .../_index.zh-tw.md | 0 .../guidelines-backend.en-us.md | 8 +- .../guidelines-backend.zh-cn.md | 8 +- .../guidelines-frontend.en-us.md | 8 +- .../guidelines-frontend.zh-cn.md | 8 +- .../guidelines-refactoring.en-us.md | 8 +- .../guidelines-refactoring.zh-cn.md | 8 +- .../localization.de-de.md | 4 +- .../localization.en-us.md | 4 +- .../localization.zh-cn.md | 4 +- .../localization.zh-tw.md | 4 +- .../translation.zh-cn.md | 4 +- ...velopment.en-us.md => development.en-us.md | 4 +- ...velopment.zh-cn.md => development.zh-cn.md | 4 +- ...velopment.zh-tw.md => development.zh-tw.md | 4 +- .../_index.en-us.md | 0 .../_index.zh-cn.md | 0 .../_index.zh-tw.md | 0 .../api-usage.en-us.md | 8 +- .../api-usage.zh-cn.md | 4 +- .../hacking-on-gitea.en-us.md | 22 ++-- .../hacking-on-gitea.zh-cn.md | 22 ++-- .../integrations.en-us.md | 4 +- .../integrations.zh-cn.md | 4 +- .../integrations.zh-tw.md | 4 +- .../migrations.en-us.md | 4 +- .../migrations.zh-cn.md | 4 +- .../migrations.zh-tw.md | 4 +- .../oauth2-provider.en-us.md | 8 +- .../oauth2-provider.zh-cn.md | 8 +- .../oauth2-provider.zh-tw.md | 6 +- doc/help.en-us.md => help.en-us.md | 4 +- doc/help.fr-fr.md => help.fr-fr.md | 4 +- doc/help.zh-cn.md => help.zh-cn.md | 4 +- doc/help.zh-tw.md => help.zh-tw.md | 4 +- {doc/help => help}/_index.en-us.md | 0 {doc/help => help}/_index.zh-cn.md | 0 {doc/help => help}/_index.zh-tw.md | 0 {doc/help => help}/faq.en-us.md | 42 +++---- {doc/help => help}/faq.zh-cn.md | 48 ++++---- {doc/help => help}/support.en-us.md | 4 +- {doc/help => help}/support.zh-cn.md | 4 +- {doc/help => help}/support.zh-tw.md | 4 +- page/index.de-de.md => index.de-de.md | 5 +- page/index.en-us.md => index.en-us.md | 5 +- page/index.fr-fr.md => index.fr-fr.md | 5 +- page/index.zh-cn.md => index.zh-cn.md | 5 +- page/index.zh-tw.md => index.zh-tw.md | 5 +- ...allation.en-us.md => installation.en-us.md | 4 +- ...allation.fr-fr.md => installation.fr-fr.md | 4 +- ...allation.zh-cn.md => installation.zh-cn.md | 4 +- ...allation.zh-tw.md => installation.zh-tw.md | 4 +- .../_index.en-us.md | 0 .../_index.fr-fr.md | 0 .../_index.zh-cn.md | 0 .../_index.zh-tw.md | 0 .../comparison.en-us.md | 8 +- .../comparison.zh-cn.md | 4 +- .../comparison.zh-tw.md | 6 +- .../database-preparation.en-us.md | 8 +- .../database-preparation.zh-cn.md | 8 +- .../from-binary.en-us.md | 24 ++-- .../from-binary.fr-fr.md | 8 +- .../from-binary.zh-cn.md | 20 ++- .../from-binary.zh-tw.md | 6 +- .../from-package.en-us.md | 12 +- .../from-package.fr-fr.md | 10 +- .../from-package.zh-cn.md | 12 +- .../from-package.zh-tw.md | 10 +- .../from-source.en-us.md | 30 ++--- .../from-source.fr-fr.md | 10 +- .../from-source.zh-cn.md | 18 ++- .../from-source.zh-tw.md | 10 +- .../on-cloud-provider.en-us.md | 8 +- .../on-cloud-provider.zh-cn.md | 8 +- .../on-kubernetes.en-us.md | 5 +- .../on-kubernetes.zh-cn.md | 5 +- .../on-kubernetes.zh-tw.md | 5 +- .../run-as-service-in-ubuntu.en-us.md | 4 +- .../run-as-service-in-ubuntu.zh-cn.md | 4 +- .../run-as-service-in-ubuntu.zh-tw.md | 4 +- .../upgrade-from-gitea.en-us.md | 8 +- .../upgrade-from-gitea.zh-cn.md | 8 +- .../upgrade-from-gogs.en-us.md | 10 +- .../upgrade-from-gogs.fr-fr.md | 4 +- .../upgrade-from-gogs.zh-cn.md | 4 +- .../upgrade-from-gogs.zh-tw.md | 8 +- .../windows-service.en-us.md | 4 +- .../windows-service.fr-fr.md | 4 +- .../windows-service.zh-cn.md | 4 +- .../windows-service.zh-tw.md | 4 +- .../with-docker-rootless.en-us.md | 20 +-- .../with-docker-rootless.zh-cn.md | 20 +-- .../with-docker.en-us.md | 20 ++- .../with-docker.fr-fr.md | 6 +- .../with-docker.zh-cn.md | 20 ++- .../with-docker.zh-tw.md | 6 +- doc/packages.en-us.md => packages.en-us.md | 4 +- doc/search.de-de.md => search.de-de.md | 3 +- doc/search.en-us.md => search.en-us.md | 3 +- doc/search.fr-fr.md => search.fr-fr.md | 3 +- doc/search.nl-nl.md => search.nl-nl.md | 3 +- doc/search.pt-br.md => search.pt-br.md | 3 +- doc/search.zh-cn.md => search.zh-cn.md | 3 +- doc/search.zh-tw.md => search.zh-tw.md | 3 +- doc/usage.en-us.md => usage.en-us.md | 4 +- doc/usage.zh-cn.md => usage.zh-cn.md | 4 +- doc/usage.zh-tw.md => usage.zh-tw.md | 4 +- {doc/usage => usage}/_index.en-us.md | 0 {doc/usage => usage}/_index.zh-cn.md | 0 {doc/usage => usage}/_index.zh-tw.md | 0 .../actions/act-runner.en-us.md | 8 +- .../actions/act-runner.zh-cn.md | 14 +-- .../actions/comparison.en-us.md | 10 +- .../actions/comparison.zh-cn.md | 10 +- {doc/usage => usage}/actions/design.en-us.md | 8 +- {doc/usage => usage}/actions/design.zh-cn.md | 8 +- {doc/usage => usage}/actions/faq.en-us.md | 8 +- {doc/usage => usage}/actions/faq.zh-cn.md | 8 +- .../usage => usage}/actions/overview.en-us.md | 8 +- .../usage => usage}/actions/overview.zh-cn.md | 8 +- .../actions/quickstart.en-us.md | 16 +-- .../actions/quickstart.zh-cn.md | 16 +-- {doc/usage => usage}/agit-support.en-us.md | 4 +- {doc/usage => usage}/agit-support.zh-cn.md | 4 +- {doc/usage => usage}/authentication.en-us.md | 6 +- {doc/usage => usage}/authentication.zh-cn.md | 4 +- {doc/usage => usage}/authentication.zh-tw.md | 4 +- {doc/usage => usage}/clone-filter.en-us.md | 4 +- {doc/usage => usage}/clone-filter.zh-cn.md | 4 +- {doc/usage => usage}/incoming-email.en-us.md | 8 +- {doc/usage => usage}/incoming-email.zh-cn.md | 8 +- .../issue-pull-request-templates.en-us.md | 8 +- .../issue-pull-request-templates.zh-cn.md | 8 +- {doc/usage => usage}/labels.en-us.md | 4 +- {doc/usage => usage}/labels.zh-cn.md | 4 +- .../linked-references.en-us.md | 8 +- .../linked-references.zh-cn.md | 8 +- .../merge-message-templates.en-us.md | 8 +- .../merge-message-templates.zh-cn.md | 8 +- {doc/usage => usage}/packages/_index.en-us.md | 0 {doc/usage => usage}/packages/alpine.en-us.md | 10 +- {doc/usage => usage}/packages/alpine.zh-cn.md | 10 +- {doc/usage => usage}/packages/cargo.en-us.md | 10 +- {doc/usage => usage}/packages/cargo.zh-cn.md | 10 +- {doc/usage => usage}/packages/chef.en-us.md | 8 +- {doc/usage => usage}/packages/chef.zh-cn.md | 8 +- .../packages/composer.en-us.md | 10 +- .../packages/composer.zh-cn.md | 10 +- {doc/usage => usage}/packages/conan.en-us.md | 10 +- {doc/usage => usage}/packages/conan.zh-cn.md | 10 +- {doc/usage => usage}/packages/conda.en-us.md | 8 +- {doc/usage => usage}/packages/conda.zh-cn.md | 8 +- .../packages/container.en-us.md | 10 +- .../packages/container.zh-cn.md | 10 +- {doc/usage => usage}/packages/cran.en-us.md | 6 +- {doc/usage => usage}/packages/cran.zh-cn.md | 6 +- {doc/usage => usage}/packages/debian.en-us.md | 10 +- {doc/usage => usage}/packages/debian.zh-cn.md | 10 +- .../usage => usage}/packages/generic.en-us.md | 12 +- .../usage => usage}/packages/generic.zh-cn.md | 12 +- {doc/usage => usage}/packages/go.en-us.md | 12 +- {doc/usage => usage}/packages/go.zh-cn.md | 12 +- {doc/usage => usage}/packages/helm.en-us.md | 10 +- {doc/usage => usage}/packages/helm.zh-cn.md | 10 +- {doc/usage => usage}/packages/maven.en-us.md | 10 +- {doc/usage => usage}/packages/maven.zh-cn.md | 10 +- {doc/usage => usage}/packages/npm.en-us.md | 10 +- {doc/usage => usage}/packages/npm.zh-cn.md | 10 +- {doc/usage => usage}/packages/nuget.en-us.md | 12 +- {doc/usage => usage}/packages/nuget.zh-cn.md | 12 +- .../packages/overview.en-us.md | 50 ++++---- .../packages/overview.zh-cn.md | 50 ++++---- {doc/usage => usage}/packages/pub.en-us.md | 10 +- {doc/usage => usage}/packages/pub.zh-cn.md | 10 +- {doc/usage => usage}/packages/pypi.en-us.md | 10 +- {doc/usage => usage}/packages/pypi.zh-cn.md | 10 +- {doc/usage => usage}/packages/rpm.en-us.md | 10 +- {doc/usage => usage}/packages/rpm.zh-cn.md | 10 +- .../packages/rubygems.en-us.md | 10 +- .../packages/rubygems.zh-cn.md | 10 +- .../usage => usage}/packages/storage.en-us.md | 12 +- .../usage => usage}/packages/storage.zh-cn.md | 8 +- {doc/usage => usage}/packages/swift.en-us.md | 12 +- {doc/usage => usage}/packages/swift.zh-cn.md | 12 +- .../usage => usage}/packages/vagrant.en-us.md | 10 +- .../usage => usage}/packages/vagrant.zh-cn.md | 10 +- {doc/usage => usage}/permissions.en-us.md | 8 +- {doc/usage => usage}/permissions.zh-cn.md | 8 +- {doc/usage => usage}/profile-readme.en-us.md | 4 +- {doc/usage => usage}/profile-readme.zh-cn.md | 4 +- {doc/usage => usage}/protected-tags.en-us.md | 8 +- {doc/usage => usage}/protected-tags.zh-cn.md | 8 +- {doc/usage => usage}/pull-request.en-us.md | 4 +- {doc/usage => usage}/pull-request.zh-cn.md | 4 +- {doc/usage => usage}/pull-request.zh-tw.md | 4 +- {doc/usage => usage}/push.en-us.md | 10 +- {doc/usage => usage}/push.zh-cn.md | 10 +- {doc/usage => usage}/push.zh-tw.md | 10 +- {doc/usage => usage}/repo-mirror.en-us.md | 8 +- {doc/usage => usage}/repo-mirror.zh-cn.md | 8 +- {doc/usage => usage}/secrets.en-us.md | 6 +- {doc/usage => usage}/secrets.zh-cn.md | 4 +- .../template-repositories.en-us.md | 8 +- .../template-repositories.zh-cn.md | 8 +- {doc/usage => usage}/webhooks.en-us.md | 4 +- {doc/usage => usage}/webhooks.zh-cn.md | 4 +- {doc/usage => usage}/webhooks.zh-tw.md | 4 +- 259 files changed, 782 insertions(+), 1327 deletions(-) rename doc/actions.en-us.md => actions.en-us.md (78%) rename doc/administration.en-us.md => administration.en-us.md (81%) rename doc/administration.fr-fr.md => administration.fr-fr.md (79%) rename doc/administration.zh-cn.md => administration.zh-cn.md (79%) rename doc/administration.zh-tw.md => administration.zh-tw.md (79%) rename {doc/administration => administration}/_index.en-us.md (100%) rename {doc/administration => administration}/_index.zh-cn.md (100%) rename {doc/administration => administration}/_index.zh-tw.md (100%) rename {doc/administration => administration}/adding-legal-pages.en-us.md (96%) rename {doc/administration => administration}/adding-legal-pages.zh-cn.md (96%) rename {doc/administration => administration}/backup-and-restore.en-us.md (99%) rename {doc/administration => administration}/backup-and-restore.zh-cn.md (98%) rename {doc/administration => administration}/backup-and-restore.zh-tw.md (97%) rename {doc/administration => administration}/cmd-embedded.en-us.md (93%) rename {doc/administration => administration}/cmd-embedded.zh-cn.md (92%) rename {doc/administration => administration}/command-line.en-us.md (99%) rename {doc/administration => administration}/command-line.zh-cn.md (99%) rename {doc/administration => administration}/config-cheat-sheet.en-us.md (92%) rename {doc/administration => administration}/config-cheat-sheet.zh-cn.md (96%) rename {doc/administration => administration}/customizing-gitea.en-us.md (96%) rename {doc/administration => administration}/customizing-gitea.zh-cn.md (98%) rename {doc/administration => administration}/email-setup.en-us.md (94%) rename {doc/administration => administration}/email-setup.zh-cn.md (98%) rename {doc/administration => administration}/environment-variables.en-us.md (96%) rename {doc/administration => administration}/environment-variables.zh-cn.md (97%) rename {doc/administration => administration}/external-renderers.en-us.md (98%) rename {doc/administration => administration}/external-renderers.zh-cn.md (96%) rename {doc/administration => administration}/fail2ban-setup.en-us.md (98%) rename {doc/administration => administration}/fail2ban-setup.zh-cn.md (98%) rename {doc/administration => administration}/git-lfs-support.en-us.md (93%) rename {doc/administration => administration}/git-lfs-support.zh-cn.md (93%) rename {doc/administration => administration}/https-support.en-us.md (96%) rename {doc/administration => administration}/https-support.zh-cn.md (96%) rename {doc/administration => administration}/logging-config.en-us.md (97%) rename {doc/administration => administration}/logging-config.zh-cn.md (97%) rename {doc/administration => administration}/mail-templates.en-us.md (99%) rename {doc/administration => administration}/mail-templates.zh-cn.md (99%) rename {doc/administration => administration}/repo-indexer.en-us.md (97%) rename {doc/administration => administration}/repo-indexer.zh-cn.md (97%) rename {doc/administration => administration}/reverse-proxies.en-us.md (99%) rename {doc/administration => administration}/reverse-proxies.zh-cn.md (98%) rename {doc/administration => administration}/search-engines-indexation.en-us.md (91%) rename {doc/administration => administration}/search-engines-indexation.zh-cn.md (87%) rename {doc/administration => administration}/signing.en-us.md (98%) rename {doc/administration => administration}/signing.zh-cn.md (99%) rename doc/contributing.en-us.md => contributing.en-us.md (79%) rename doc/contributing.fr-fr.md => contributing.fr-fr.md (79%) rename doc/contributing.zh-tw.md => contributing.zh-tw.md (78%) rename {doc/contributing => contributing}/_index.de-de.md (100%) rename {doc/contributing => contributing}/_index.en-us.md (100%) rename {doc/contributing => contributing}/_index.zh-cn.md (100%) rename {doc/contributing => contributing}/_index.zh-tw.md (100%) rename {doc/contributing => contributing}/guidelines-backend.en-us.md (99%) rename {doc/contributing => contributing}/guidelines-backend.zh-cn.md (99%) rename {doc/contributing => contributing}/guidelines-frontend.en-us.md (98%) rename {doc/contributing => contributing}/guidelines-frontend.zh-cn.md (99%) rename {doc/contributing => contributing}/guidelines-refactoring.en-us.md (97%) rename {doc/contributing => contributing}/guidelines-refactoring.zh-cn.md (97%) rename {doc/contributing => contributing}/localization.de-de.md (97%) rename {doc/contributing => contributing}/localization.en-us.md (96%) rename {doc/contributing => contributing}/localization.zh-cn.md (95%) rename {doc/contributing => contributing}/localization.zh-tw.md (95%) rename {doc/contributing => contributing}/translation.zh-cn.md (87%) rename doc/development.en-us.md => development.en-us.md (79%) rename doc/development.zh-cn.md => development.zh-cn.md (78%) rename doc/development.zh-tw.md => development.zh-tw.md (78%) rename {doc/development => development}/_index.en-us.md (100%) rename {doc/development => development}/_index.zh-cn.md (100%) rename {doc/development => development}/_index.zh-tw.md (100%) rename {doc/development => development}/api-usage.en-us.md (98%) rename {doc/development => development}/api-usage.zh-cn.md (98%) rename {doc/development => development}/hacking-on-gitea.en-us.md (95%) rename {doc/development => development}/hacking-on-gitea.zh-cn.md (94%) rename {doc/development => development}/integrations.en-us.md (96%) rename {doc/development => development}/integrations.zh-cn.md (96%) rename {doc/development => development}/integrations.zh-tw.md (94%) rename {doc/development => development}/migrations.en-us.md (97%) rename {doc/development => development}/migrations.zh-cn.md (97%) rename {doc/development => development}/migrations.zh-tw.md (97%) rename {doc/development => development}/oauth2-provider.en-us.md (99%) rename {doc/development => development}/oauth2-provider.zh-cn.md (99%) rename {doc/development => development}/oauth2-provider.zh-tw.md (98%) rename doc/help.en-us.md => help.en-us.md (76%) rename doc/help.fr-fr.md => help.fr-fr.md (76%) rename doc/help.zh-cn.md => help.zh-cn.md (77%) rename doc/help.zh-tw.md => help.zh-tw.md (77%) rename {doc/help => help}/_index.en-us.md (100%) rename {doc/help => help}/_index.zh-cn.md (100%) rename {doc/help => help}/_index.zh-tw.md (100%) rename {doc/help => help}/faq.en-us.md (89%) rename {doc/help => help}/faq.zh-cn.md (88%) rename {doc/help => help}/support.en-us.md (97%) rename {doc/help => help}/support.zh-cn.md (93%) rename {doc/help => help}/support.zh-tw.md (95%) rename page/index.de-de.md => index.de-de.md (96%) rename page/index.en-us.md => index.en-us.md (99%) rename page/index.fr-fr.md => index.fr-fr.md (99%) rename page/index.zh-cn.md => index.zh-cn.md (98%) rename page/index.zh-tw.md => index.zh-tw.md (99%) rename doc/installation.en-us.md => installation.en-us.md (79%) rename doc/installation.fr-fr.md => installation.fr-fr.md (79%) rename doc/installation.zh-cn.md => installation.zh-cn.md (78%) rename doc/installation.zh-tw.md => installation.zh-tw.md (78%) rename {doc/installation => installation}/_index.en-us.md (100%) rename {doc/installation => installation}/_index.fr-fr.md (100%) rename {doc/installation => installation}/_index.zh-cn.md (100%) rename {doc/installation => installation}/_index.zh-tw.md (100%) rename {doc/installation => installation}/comparison.en-us.md (99%) rename {doc/installation => installation}/comparison.zh-cn.md (99%) rename {doc/installation => installation}/comparison.zh-tw.md (99%) rename {doc/installation => installation}/database-preparation.en-us.md (99%) rename {doc/installation => installation}/database-preparation.zh-cn.md (99%) rename {doc/installation => installation}/from-binary.en-us.md (90%) rename {doc/installation => installation}/from-binary.fr-fr.md (91%) rename {doc/installation => installation}/from-binary.zh-cn.md (89%) rename {doc/installation => installation}/from-binary.zh-tw.md (89%) rename {doc/installation => installation}/from-package.en-us.md (91%) rename {doc/installation => installation}/from-package.fr-fr.md (81%) rename {doc/installation => installation}/from-package.zh-cn.md (90%) rename {doc/installation => installation}/from-package.zh-tw.md (79%) rename {doc/installation => installation}/from-source.en-us.md (89%) rename {doc/installation => installation}/from-source.fr-fr.md (93%) rename {doc/installation => installation}/from-source.zh-cn.md (86%) rename {doc/installation => installation}/from-source.zh-tw.md (87%) rename {doc/installation => installation}/on-cloud-provider.en-us.md (97%) rename {doc/installation => installation}/on-cloud-provider.zh-cn.md (96%) rename {doc/installation => installation}/on-kubernetes.en-us.md (97%) rename {doc/installation => installation}/on-kubernetes.zh-cn.md (97%) rename {doc/installation => installation}/on-kubernetes.zh-tw.md (97%) rename {doc/installation => installation}/run-as-service-in-ubuntu.en-us.md (97%) rename {doc/installation => installation}/run-as-service-in-ubuntu.zh-cn.md (97%) rename {doc/installation => installation}/run-as-service-in-ubuntu.zh-tw.md (97%) rename {doc/installation => installation}/upgrade-from-gitea.en-us.md (98%) rename {doc/installation => installation}/upgrade-from-gitea.zh-cn.md (98%) rename {doc/installation => installation}/upgrade-from-gogs.en-us.md (97%) rename {doc/installation => installation}/upgrade-from-gogs.fr-fr.md (98%) rename {doc/installation => installation}/upgrade-from-gogs.zh-cn.md (95%) rename {doc/installation => installation}/upgrade-from-gogs.zh-tw.md (97%) rename {doc/installation => installation}/windows-service.en-us.md (97%) rename {doc/installation => installation}/windows-service.fr-fr.md (95%) rename {doc/installation => installation}/windows-service.zh-cn.md (95%) rename {doc/installation => installation}/windows-service.zh-tw.md (96%) rename {doc/installation => installation}/with-docker-rootless.en-us.md (94%) rename {doc/installation => installation}/with-docker-rootless.zh-cn.md (94%) rename {doc/installation => installation}/with-docker.en-us.md (98%) rename {doc/installation => installation}/with-docker.fr-fr.md (98%) rename {doc/installation => installation}/with-docker.zh-cn.md (97%) rename {doc/installation => installation}/with-docker.zh-tw.md (96%) rename doc/packages.en-us.md => packages.en-us.md (79%) rename doc/search.de-de.md => search.de-de.md (95%) rename doc/search.en-us.md => search.en-us.md (95%) rename doc/search.fr-fr.md => search.fr-fr.md (95%) rename doc/search.nl-nl.md => search.nl-nl.md (95%) rename doc/search.pt-br.md => search.pt-br.md (95%) rename doc/search.zh-cn.md => search.zh-cn.md (95%) rename doc/search.zh-tw.md => search.zh-tw.md (95%) rename doc/usage.en-us.md => usage.en-us.md (77%) rename doc/usage.zh-cn.md => usage.zh-cn.md (78%) rename doc/usage.zh-tw.md => usage.zh-tw.md (77%) rename {doc/usage => usage}/_index.en-us.md (100%) rename {doc/usage => usage}/_index.zh-cn.md (100%) rename {doc/usage => usage}/_index.zh-tw.md (100%) rename {doc/usage => usage}/actions/act-runner.en-us.md (99%) rename {doc/usage => usage}/actions/act-runner.zh-cn.md (98%) rename {doc/usage => usage}/actions/comparison.en-us.md (97%) rename {doc/usage => usage}/actions/comparison.zh-cn.md (96%) rename {doc/usage => usage}/actions/design.en-us.md (99%) rename {doc/usage => usage}/actions/design.zh-cn.md (99%) rename {doc/usage => usage}/actions/faq.en-us.md (99%) rename {doc/usage => usage}/actions/faq.zh-cn.md (99%) rename {doc/usage => usage}/actions/overview.en-us.md (97%) rename {doc/usage => usage}/actions/overview.zh-cn.md (97%) rename {doc/usage => usage}/actions/quickstart.en-us.md (90%) rename {doc/usage => usage}/actions/quickstart.zh-cn.md (90%) rename {doc/usage => usage}/agit-support.en-us.md (97%) rename {doc/usage => usage}/agit-support.zh-cn.md (96%) rename {doc/usage => usage}/authentication.en-us.md (99%) rename {doc/usage => usage}/authentication.zh-cn.md (97%) rename {doc/usage => usage}/authentication.zh-tw.md (84%) rename {doc/usage => usage}/clone-filter.en-us.md (96%) rename {doc/usage => usage}/clone-filter.zh-cn.md (97%) rename {doc/usage => usage}/incoming-email.en-us.md (96%) rename {doc/usage => usage}/incoming-email.zh-cn.md (97%) rename {doc/usage => usage}/issue-pull-request-templates.en-us.md (99%) rename {doc/usage => usage}/issue-pull-request-templates.zh-cn.md (99%) rename {doc/usage => usage}/labels.en-us.md (97%) rename {doc/usage => usage}/labels.zh-cn.md (97%) rename {doc/usage => usage}/linked-references.en-us.md (99%) rename {doc/usage => usage}/linked-references.zh-cn.md (99%) rename {doc/usage => usage}/merge-message-templates.en-us.md (96%) rename {doc/usage => usage}/merge-message-templates.zh-cn.md (97%) rename {doc/usage => usage}/packages/_index.en-us.md (100%) rename {doc/usage => usage}/packages/alpine.en-us.md (92%) rename {doc/usage => usage}/packages/alpine.zh-cn.md (94%) rename {doc/usage => usage}/packages/cargo.en-us.md (94%) rename {doc/usage => usage}/packages/cargo.zh-cn.md (94%) rename {doc/usage => usage}/packages/chef.en-us.md (97%) rename {doc/usage => usage}/packages/chef.zh-cn.md (98%) rename {doc/usage => usage}/packages/composer.en-us.md (93%) rename {doc/usage => usage}/packages/composer.zh-cn.md (94%) rename {doc/usage => usage}/packages/conan.en-us.md (91%) rename {doc/usage => usage}/packages/conan.zh-cn.md (93%) rename {doc/usage => usage}/packages/conda.en-us.md (97%) rename {doc/usage => usage}/packages/conda.zh-cn.md (98%) rename {doc/usage => usage}/packages/container.en-us.md (90%) rename {doc/usage => usage}/packages/container.zh-cn.md (92%) rename {doc/usage => usage}/packages/cran.en-us.md (97%) rename {doc/usage => usage}/packages/cran.zh-cn.md (98%) rename {doc/usage => usage}/packages/debian.en-us.md (92%) rename {doc/usage => usage}/packages/debian.zh-cn.md (93%) rename {doc/usage => usage}/packages/generic.en-us.md (93%) rename {doc/usage => usage}/packages/generic.zh-cn.md (94%) rename {doc/usage => usage}/packages/go.en-us.md (86%) rename {doc/usage => usage}/packages/go.zh-cn.md (89%) rename {doc/usage => usage}/packages/helm.en-us.md (90%) rename {doc/usage => usage}/packages/helm.zh-cn.md (93%) rename {doc/usage => usage}/packages/maven.en-us.md (95%) rename {doc/usage => usage}/packages/maven.zh-cn.md (95%) rename {doc/usage => usage}/packages/npm.en-us.md (95%) rename {doc/usage => usage}/packages/npm.zh-cn.md (95%) rename {doc/usage => usage}/packages/nuget.en-us.md (91%) rename {doc/usage => usage}/packages/nuget.zh-cn.md (93%) rename {doc/usage => usage}/packages/overview.en-us.md (61%) rename {doc/usage => usage}/packages/overview.zh-cn.md (56%) rename {doc/usage => usage}/packages/pub.en-us.md (91%) rename {doc/usage => usage}/packages/pub.zh-cn.md (91%) rename {doc/usage => usage}/packages/pypi.en-us.md (92%) rename {doc/usage => usage}/packages/pypi.zh-cn.md (94%) rename {doc/usage => usage}/packages/rpm.en-us.md (90%) rename {doc/usage => usage}/packages/rpm.zh-cn.md (88%) rename {doc/usage => usage}/packages/rubygems.en-us.md (93%) rename {doc/usage => usage}/packages/rubygems.zh-cn.md (94%) rename {doc/usage => usage}/packages/storage.en-us.md (89%) rename {doc/usage => usage}/packages/storage.zh-cn.md (99%) rename {doc/usage => usage}/packages/swift.en-us.md (89%) rename {doc/usage => usage}/packages/swift.zh-cn.md (92%) rename {doc/usage => usage}/packages/vagrant.en-us.md (91%) rename {doc/usage => usage}/packages/vagrant.zh-cn.md (92%) rename {doc/usage => usage}/permissions.en-us.md (98%) rename {doc/usage => usage}/permissions.zh-cn.md (98%) rename {doc/usage => usage}/profile-readme.en-us.md (94%) rename {doc/usage => usage}/profile-readme.zh-cn.md (94%) rename {doc/usage => usage}/protected-tags.en-us.md (97%) rename {doc/usage => usage}/protected-tags.zh-cn.md (98%) rename {doc/usage => usage}/pull-request.en-us.md (98%) rename {doc/usage => usage}/pull-request.zh-cn.md (94%) rename {doc/usage => usage}/pull-request.zh-tw.md (94%) rename {doc/usage => usage}/push.en-us.md (92%) rename {doc/usage => usage}/push.zh-cn.md (90%) rename {doc/usage => usage}/push.zh-tw.md (91%) rename {doc/usage => usage}/repo-mirror.en-us.md (98%) rename {doc/usage => usage}/repo-mirror.zh-cn.md (98%) rename {doc/usage => usage}/secrets.en-us.md (89%) rename {doc/usage => usage}/secrets.zh-cn.md (96%) rename {doc/usage => usage}/template-repositories.en-us.md (98%) rename {doc/usage => usage}/template-repositories.zh-cn.md (98%) rename {doc/usage => usage}/webhooks.en-us.md (99%) rename {doc/usage => usage}/webhooks.zh-cn.md (99%) rename {doc/usage => usage}/webhooks.zh-tw.md (99%) diff --git a/doc/actions.en-us.md b/actions.en-us.md similarity index 78% rename from doc/actions.en-us.md rename to actions.en-us.md index 7cd2ba05..d8e33d37 100644 --- a/doc/actions.en-us.md +++ b/actions.en-us.md @@ -2,12 +2,12 @@ date: "2023-04-27T14:00:00+08:00" title: "Actions" slug: "actions" -weight: 36 +sidebar_position: 36 toc: false draft: false menu: sidebar: name: "Usage - Actions" - weight: 31 + sidebar_position: 31 identifier: "actions" --- diff --git a/doc/administration.en-us.md b/administration.en-us.md similarity index 81% rename from doc/administration.en-us.md rename to administration.en-us.md index 5d3ba385..416b9e63 100644 --- a/doc/administration.en-us.md +++ b/administration.en-us.md @@ -2,13 +2,13 @@ date: "2016-12-01T16:00:00+02:00" title: "Administration" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "Administration" - weight: 20 + sidebar_position: 20 collapse: true identifier: "administration" --- diff --git a/doc/administration.fr-fr.md b/administration.fr-fr.md similarity index 79% rename from doc/administration.fr-fr.md rename to administration.fr-fr.md index 957ff7b1..ed11881b 100644 --- a/doc/administration.fr-fr.md +++ b/administration.fr-fr.md @@ -2,12 +2,12 @@ date: "2017-08-23T09:00:00+02:00" title: "Avancé" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "Avancé" - weight: 20 + sidebar_position: 20 identifier: "administration" --- diff --git a/doc/administration.zh-cn.md b/administration.zh-cn.md similarity index 79% rename from doc/administration.zh-cn.md rename to administration.zh-cn.md index 6e032d32..262e5f06 100644 --- a/doc/administration.zh-cn.md +++ b/administration.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "运维" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "运维" - weight: 20 + sidebar_position: 20 identifier: "administration" --- diff --git a/doc/administration.zh-tw.md b/administration.zh-tw.md similarity index 79% rename from doc/administration.zh-tw.md rename to administration.zh-tw.md index daf8e3f1..455d6a36 100644 --- a/doc/administration.zh-tw.md +++ b/administration.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "運維" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "運維" - weight: 20 + sidebar_position: 20 identifier: "administration" --- diff --git a/doc/administration/_index.en-us.md b/administration/_index.en-us.md similarity index 100% rename from doc/administration/_index.en-us.md rename to administration/_index.en-us.md diff --git a/doc/administration/_index.zh-cn.md b/administration/_index.zh-cn.md similarity index 100% rename from doc/administration/_index.zh-cn.md rename to administration/_index.zh-cn.md diff --git a/doc/administration/_index.zh-tw.md b/administration/_index.zh-tw.md similarity index 100% rename from doc/administration/_index.zh-tw.md rename to administration/_index.zh-tw.md diff --git a/doc/administration/adding-legal-pages.en-us.md b/administration/adding-legal-pages.en-us.md similarity index 96% rename from doc/administration/adding-legal-pages.en-us.md rename to administration/adding-legal-pages.en-us.md index 6de145ce..c6f68edc 100644 --- a/doc/administration/adding-legal-pages.en-us.md +++ b/administration/adding-legal-pages.en-us.md @@ -2,7 +2,7 @@ date: "2019-12-28" title: "Adding Legal Pages" slug: adding-legal-pages -weight: 110 +sidebar_position: 110 toc: false draft: false aliases: @@ -12,7 +12,7 @@ menu: parent: "administration" name: "Adding Legal Pages" identifier: "adding-legal-pages" - weight: 110 + sidebar_position: 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. diff --git a/doc/administration/adding-legal-pages.zh-cn.md b/administration/adding-legal-pages.zh-cn.md similarity index 96% rename from doc/administration/adding-legal-pages.zh-cn.md rename to administration/adding-legal-pages.zh-cn.md index dc0bccef..5d582e87 100644 --- a/doc/administration/adding-legal-pages.zh-cn.md +++ b/administration/adding-legal-pages.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "添加法律页面" slug: adding-legal-pages -weight: 110 +sidebar_position: 110 toc: false draft: false aliases: @@ -12,7 +12,7 @@ menu: parent: "administration" name: "添加法律页面" identifier: "adding-legal-pages" - weight: 110 + sidebar_position: 110 --- 一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。 diff --git a/doc/administration/backup-and-restore.en-us.md b/administration/backup-and-restore.en-us.md similarity index 99% rename from doc/administration/backup-and-restore.en-us.md rename to administration/backup-and-restore.en-us.md index 5a722f49..251bd53a 100644 --- a/doc/administration/backup-and-restore.en-us.md +++ b/administration/backup-and-restore.en-us.md @@ -2,7 +2,7 @@ date: "2017-01-01T16:00:00+02:00" title: "Backup and Restore" slug: "backup-and-restore" -weight: 11 +sidebar_position: 11 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Backup and Restore" - weight: 11 + sidebar_position: 11 identifier: "backup-and-restore" --- @@ -20,10 +20,6 @@ menu: Gitea currently has a `dump` command that will save the installation to a ZIP file. This file can be unpacked and used to restore an instance. -**Table of Contents** - -{{< toc >}} - ## Backup Consistency To ensure the consistency of the Gitea instance, it must be shutdown during backup. diff --git a/doc/administration/backup-and-restore.zh-cn.md b/administration/backup-and-restore.zh-cn.md similarity index 98% rename from doc/administration/backup-and-restore.zh-cn.md rename to administration/backup-and-restore.zh-cn.md index 89ae9392..98d378d5 100644 --- a/doc/administration/backup-and-restore.zh-cn.md +++ b/administration/backup-and-restore.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-06-06T09:33:00+08:00" title: "备份与恢复" slug: "backup-and-restore" -weight: 11 +sidebar_position: 11 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "备份与恢复" - weight: 11 + sidebar_position: 11 identifier: "backup-and-restore" --- diff --git a/doc/administration/backup-and-restore.zh-tw.md b/administration/backup-and-restore.zh-tw.md similarity index 97% rename from doc/administration/backup-and-restore.zh-tw.md rename to administration/backup-and-restore.zh-tw.md index 07b9b072..4966ccdc 100644 --- a/doc/administration/backup-and-restore.zh-tw.md +++ b/administration/backup-and-restore.zh-tw.md @@ -2,7 +2,7 @@ date: "2017-01-01T16:00:00+02:00" title: "用法: 備份與還原" slug: "backup-and-restore" -weight: 11 +sidebar_position: 11 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "備份與還原" - weight: 11 + sidebar_position: 11 identifier: "backup-and-restore" --- diff --git a/doc/administration/cmd-embedded.en-us.md b/administration/cmd-embedded.en-us.md similarity index 93% rename from doc/administration/cmd-embedded.en-us.md rename to administration/cmd-embedded.en-us.md index 36cf0008..abf949cd 100644 --- a/doc/administration/cmd-embedded.en-us.md +++ b/administration/cmd-embedded.en-us.md @@ -2,7 +2,7 @@ date: "2020-01-25T21:00:00-03:00" title: "Embedded data extraction tool" slug: "cmd-embedded" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "administration" name: "Embedded data extraction tool" - weight: 20 + sidebar_position: 20 identifier: "cmd-embedded" --- # Embedded data extraction tool -**Table of Contents** - -{{< toc >}} - 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/administration/customizing-gitea.en-us.md" >}})). +inside the `custom` directory (see [Customizing Gitea](administration/customizing-gitea.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. @@ -87,7 +83,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/administration/customizing-gitea.en-us.md" >}}) for details. +Gitea normally starts. See [Customizing Gitea](administration/customizing-gitea.md) for details. The `--overwrite` flag allows any existing files in the destination directory to be overwritten. diff --git a/doc/administration/cmd-embedded.zh-cn.md b/administration/cmd-embedded.zh-cn.md similarity index 92% rename from doc/administration/cmd-embedded.zh-cn.md rename to administration/cmd-embedded.zh-cn.md index 663d9cda..27ee6104 100644 --- a/doc/administration/cmd-embedded.zh-cn.md +++ b/administration/cmd-embedded.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "嵌入资源提取工具" slug: "cmd-embedded" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,17 +11,13 @@ menu: sidebar: parent: "administration" name: "嵌入资源提取工具" - weight: 20 + sidebar_position: 20 identifier: "cmd-embedded" --- # 嵌入资源提取工具 -**目录** - -{{< toc >}} - -Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}))。 +Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置](administration/customizing-gitea.md))。 要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。 @@ -75,7 +71,7 @@ gitea [--config {file}] embedded extract [--destination {dir}|--custom] [--overw `--destination` 选项用于指定提取文件的目标目录。默认为当前目录。 -`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})。 +`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置](administration/customizing-gitea.md)。 `--overwrite` 标志允许覆盖目标目录中的任何现有文件。 diff --git a/doc/administration/command-line.en-us.md b/administration/command-line.en-us.md similarity index 99% rename from doc/administration/command-line.en-us.md rename to administration/command-line.en-us.md index 2ac74896..2e892e2f 100644 --- a/doc/administration/command-line.en-us.md +++ b/administration/command-line.en-us.md @@ -2,7 +2,7 @@ date: "2017-01-01T16:00:00+02:00" title: "Gitea Command Line" slug: "command-line" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Command Line" - weight: 1 + sidebar_position: 1 identifier: "command-line" --- # Command Line -**Table of Contents** - -{{< toc >}} - ## Usage `gitea [global options] command [command or global options] [arguments...]` diff --git a/doc/administration/command-line.zh-cn.md b/administration/command-line.zh-cn.md similarity index 99% rename from doc/administration/command-line.zh-cn.md rename to administration/command-line.zh-cn.md index c05e95d3..9374ef49 100644 --- a/doc/administration/command-line.zh-cn.md +++ b/administration/command-line.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Gitea 命令行" slug: "command-line" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Gitea 命令行" - weight: 1 + sidebar_position: 1 identifier: "command-line" --- # 命令行 -**目录** - -{{< toc >}} - ## 用法 `gitea [全局选项] 命令 [命令或全局选项] [参数...]` diff --git a/doc/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md similarity index 92% rename from doc/administration/config-cheat-sheet.en-us.md rename to administration/config-cheat-sheet.en-us.md index dd59a4b9..d61e23d0 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-26T16:00:00+02:00" title: "Config Cheat Sheet" slug: "config-cheat-sheet" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Config Cheat Sheet" - weight: 30 + sidebar_position: 30 identifier: "config-cheat-sheet" --- @@ -35,8 +35,6 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. **Note:** A full restart is required for Gitea configuration changes to take effect. -{{< toc >}} - ## Default Configuration (non-`app.ini` configuration) These values are environment-dependent but form the basis of a lot of values. They will be @@ -82,7 +80,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `SCRIPT_TYPE`: **bash**: The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available. - `DETECTED_CHARSETS_ORDER`: **UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr**: Tie-break order of detected charsets - if the detected charsets have equal confidence, charsets earlier in the list will be chosen in preference to those later. Adding `defaults` will place the unnamed charsets at that point. -- `ANSI_CHARSET`: **\**: Default ANSI charset to override non-UTF-8 charsets to. +- `ANSI_CHARSET`: **_empty_**: Default ANSI charset to override non-UTF-8 charsets to. - `FORCE_PRIVATE`: **false**: Force every new repository to be private. - `DEFAULT_PRIVATE`: **last**: Default private when creating a new repository. \[last, private, public\] @@ -97,7 +95,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build default SSH port is used. - `GO_GET_CLONE_URL_PROTOCOL`: **https**: Value for the "go get" request returns the repository url as https or ssh default is https. -- `ACCESS_CONTROL_ALLOW_ORIGIN`: **\**: Value for Access-Control-Allow-Origin header, +- `ACCESS_CONTROL_ALLOW_ORIGIN`: **_empty_**: Value for Access-Control-Allow-Origin header, default is not to present. **WARNING**: This maybe harmful to you website if you do not give it a right value. - `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: Close an issue if a commit on a non default branch marks it as closed. @@ -147,13 +145,13 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `ENABLED`: **true**: Whether repository file uploads are enabled - `TEMP_PATH`: **data/tmp/uploads**: Path for uploads (content gets deleted on Gitea restart) -- `ALLOWED_TYPES`: **\**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. - `FILE_MAX_SIZE`: **3**: Max size of each file in megabytes. - `MAX_FILES`: **5**: Max number of files per upload ### Repository - Release (`repository.release`) -- `ALLOWED_TYPES`: **\**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. - `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface - For settings related to file attachments on releases, see the `attachment` section. @@ -291,7 +289,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `ROOT_URL`: **%(PROTOCOL)s://%(DOMAIN)s:%(HTTP\_PORT)s/**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -- `STATIC_URL_PREFIX`: **\**: +- `STATIC_URL_PREFIX`: **_empty_**: Overwrite this option to request static resources from a different URL. This includes CSS files, images, JS files and web fonts. Avatar images are dynamic resources and still served by Gitea. @@ -334,7 +332,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SSH_ROOT_PATH`: **~/.ssh**: Root path of SSH directory. - `SSH_CREATE_AUTHORIZED_KEYS_FILE`: **true**: Gitea will create a authorized_keys file by default when it is not using the internal ssh server. If you intend to use the AuthorizedKeysCommand functionality then you should turn this off. - `SSH_AUTHORIZED_KEYS_BACKUP`: **true**: Enable SSH Authorized Key Backup when rewriting all keys, default is true. -- `SSH_TRUSTED_USER_CA_KEYS`: **\**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh- ` or `ssh- , ssh- `. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`. +- `SSH_TRUSTED_USER_CA_KEYS`: **_empty_**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh- ` or `ssh- , ssh- `. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`. - `SSH_TRUSTED_USER_CA_KEYS_FILENAME`: **`RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem**: Absolute path of the `TrustedUserCaKeys` file Gitea will manage. If you're running your own ssh server and you want to use the Gitea managed file you'll also need to modify your sshd_config to point to this file. The official docker image will automatically work without further configuration. - `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set. - `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`. @@ -345,7 +343,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect - `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: For the built-in SSH server, choose the keypairs to offer as the host key. The private key should be at `SSH_SERVER_HOST_KEY` and the public `SSH_SERVER_HOST_KEY.pub`. Relative paths are made absolute relative to the `APP_DATA_PATH`. If no key exists a 4096 bit RSA key will be created for you. - `SSH_KEY_TEST_PATH`: **/tmp**: Directory to create temporary files in when testing public keys using ssh-keygen, default is the system temporary directory. -- `SSH_KEYGEN_PATH`: **\**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself. +- `SSH_KEYGEN_PATH`: **_empty_**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself. - `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false. - `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to -1 to disable all timeouts.) @@ -364,7 +362,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login, **custom**\]. Where custom would instead be any URL such as "/org/repo" or even `https://anotherwebsite.com` - `LFS_START_SERVER`: **false**: Enables Git LFS support. - `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)s/lfs**: Default LFS content path. (if it is on local storage.) **DEPRECATED** use settings in `[lfs]`. -- `LFS_JWT_SECRET`: **\**: LFS authentication secret, change this a unique string. +- `LFS_JWT_SECRET`: **_empty_**: LFS authentication secret, change this a unique string. - `LFS_HTTP_AUTH_EXPIRY`: **24h**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail. - `LFS_MAX_FILE_SIZE`: **0**: Maximum allowed LFS file size in bytes (Set to 0 for no limit). - `LFS_LOCKS_PAGING_NUM`: **50**: Maximum number of LFS Locks returned per page. @@ -373,7 +371,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `REDIRECTOR_USE_PROXY_PROTOCOL`: **%(USE_PROXY_PROTOCOL)s**: expect PROXY protocol header on connections to https redirector. - `PORT_TO_REDIRECT`: **80**: Port for the http redirection service to listen on. Used when `REDIRECT_OTHER_PORT` is true. - `SSL_MIN_VERSION`: **TLSv1.2**: Set the minimum version of ssl support. -- `SSL_MAX_VERSION`: **\**: Set the maximum version of ssl support. +- `SSL_MAX_VERSION`: **_empty_**: Set the maximum version of ssl support. - `SSL_CURVE_PREFERENCES`: **X25519,P256**: Set the preferred curves, - `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: Set the preferred cipher suites. - If there is no hardware support for AES suites, by default the ChaCha suites will be preferred over the AES suites. @@ -409,11 +407,11 @@ The following configuration set `Content-Type: application/vnd.android.package-a - "ecdhe_rsa_with_chacha20_poly1305" is an alias for "ecdhe_rsa_with_chacha20_poly1305_sha256" - "ecdhe_ecdsa_with_chacha20_poly1305" is alias for "ecdhe_ecdsa_with_chacha20_poly1305_sha256" - `ENABLE_ACME`: **false**: Flag to enable automatic certificate management via an ACME capable Certificate Authority (CA) server (default: Lets Encrypt). If enabled, `CERT_FILE` and `KEY_FILE` are ignored, and the CA must resolve `DOMAIN` to this gitea server. Ensure that DNS records are set and either port `80` or port `443` are accessible by the CA server (the public internet by default), and redirected to the appropriate ports `PORT_TO_REDIRECT` or `HTTP_PORT` respectively. -- `ACME_URL`: **\**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well). +- `ACME_URL`: **_empty_**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well). - `ACME_ACCEPTTOS`: **false**: This is an explicit check that you accept the terms of service of the ACME provider. The default is Lets Encrypt [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf). - `ACME_DIRECTORY`: **https**: Directory that the certificate manager will use to cache information such as certs and private keys. -- `ACME_EMAIL`: **\**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates. -- `ACME_CA_ROOT`: **\**: The CA's root certificate. If left empty, it defaults to using the system's trust chain. +- `ACME_EMAIL`: **_empty_**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates. +- `ACME_CA_ROOT`: **_empty_**: The CA's root certificate. If left empty, it defaults to using the system's trust chain. - `ALLOW_GRACEFUL_RESTARTS`: **true**: Perform a graceful restart on SIGHUP - `GRACEFUL_HAMMER_TIME`: **60s**: After a restart the parent process will stop accepting new connections and will allow requests to finish before stopping. Shutdown will be forced if it takes longer than this time. - `STARTUP_TIMEOUT`: **0**: Shutsdown the server if startup takes longer than the provided time. On Windows setting this sends a waithint to the SVC host to tell the SVC host startup may take some time. Please note startup is determined by the opening of the listeners - HTTP/HTTPS/SSH. Indexers may take longer to startup and can have their own timeouts. @@ -424,8 +422,8 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `HOST`: **127.0.0.1:3306**: Database host address and port or absolute path for unix socket \[mysql, postgres\] (ex: /var/run/mysqld/mysqld.sock). - `NAME`: **gitea**: Database name. - `USER`: **root**: Database username. -- `PASSWD`: **\**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password. -- `SCHEMA`: **\**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand, +- `PASSWD`: **_empty_**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password. +- `SCHEMA`: **_empty_**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand, the user must have creation privileges on it, and the user search path must be set to the look into the schema first (e.g. `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`). - `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL. @@ -514,7 +512,7 @@ And the following unique queues: - `INSTALL_LOCK`: **false**: Controls access to the installation page. When set to "true", the installation page is not accessible. - `SECRET_KEY`: **\**: Global secret key. This key is VERY IMPORTANT, if you lost it, the data encrypted by it (like 2FA secret) can't be decrypted anymore. -- `SECRET_KEY_URI`: **\**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_key`). It shouldn't be lost like SECRET_KEY. +- `SECRET_KEY_URI`: **_empty_**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_key`). It shouldn't be lost like SECRET_KEY. - `LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days. - `COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username. - `COOKIE_REMEMBER_NAME`: **gitea\_incredible**: Name of cookie used to store authentication @@ -540,7 +538,7 @@ And the following unique queues: - `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately. - `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server. - `INTERNAL_TOKEN`: **\**: Secret used to validate communication within Gitea binary. -- `INTERNAL_TOKEN_URI`: **\**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`) +- `INTERNAL_TOKEN_URI`: **_empty_**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`) - `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, pbkdf2_v1, pbkdf2_hi, scrypt, bcrypt\], argon2 and scrypt will spend significant amounts of memory. - Note: The default parameters for `pbkdf2` hashing have changed - the previous settings are available as `pbkdf2_v1` but are not recommended. - The hash functions may be tuned by using `$` after the algorithm: @@ -571,23 +569,23 @@ And the following unique queues: ## Camo (`camo`) - `ENABLED`: **false**: Enable media proxy, we support images only at the moment. -- `SERVER_URL`: **\**: URL of camo server, it **is required** if camo is enabled. -- `HMAC_KEY`: **\**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled. +- `SERVER_URL`: **_empty_**: URL of camo server, it **is required** if camo is enabled. +- `HMAC_KEY`: **_empty_**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled. - `ALLWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied ## OpenID (`openid`) - `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID. - `ENABLE_OPENID_SIGNUP`: **! DISABLE\_REGISTRATION**: Allow registering via OpenID. -- `WHITELISTED_URIS`: **\**: If non-empty, list of POSIX regex patterns matching +- `WHITELISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching OpenID URI's to permit. -- `BLACKLISTED_URIS`: **\**: If non-empty, list of POSIX regex patterns matching +- `BLACKLISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching OpenID URI's to block. ## OAuth2 Client (`oauth2_client`) - `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section) -- `OPENID_CONNECT_SCOPES`: **\**: List of additional openid connect scopes. (`openid` is implicitly added) +- `OPENID_CONNECT_SCOPES`: **_empty_**: List of additional openid connect scopes. (`openid` is implicitly added) - `ENABLE_AUTO_REGISTRATION`: **false**: Automatically create user accounts for new oauth2 users. - `USERNAME`: **nickname**: The source of the username for new oauth2 accounts: - userid - use the userid / sub attribute @@ -651,8 +649,8 @@ And the following unique queues: - `ENABLE_TIMETRACKING`: **true**: Enable Timetracking feature. - `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by default. - `DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME`: **true**: Only allow users with write permissions to track time. -- `EMAIL_DOMAIN_ALLOWLIST`: **\**: If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported. -- `EMAIL_DOMAIN_BLOCKLIST`: **\**: If non-empty, comma separated list of domain names that cannot be used to register on this instance, wildcard is supported. +- `EMAIL_DOMAIN_ALLOWLIST`: **_empty_**: If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported. +- `EMAIL_DOMAIN_BLOCKLIST`: **_empty_**: If non-empty, comma separated list of domain names that cannot be used to register on this instance, wildcard is supported. - `SHOW_REGISTRATION_BUTTON`: **! DISABLE\_REGISTRATION**: Show Registration Button - `SHOW_MILESTONES_DASHBOARD_PAGE`: **true** Enable this to show the milestones dashboard page - a view of all the user's milestones - `AUTO_WATCH_NEW_REPOS`: **true**: Enable this to let all organisation users watch new repos when they are created @@ -696,8 +694,8 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type - Wildcard hosts: `*.mydomain.com`, `192.168.100.*` - `SKIP_TLS_VERIFY`: **false**: Allow insecure certification. - `PAGING_NUM`: **10**: Number of webhook history events that are shown in one page. -- `PROXY_URL`: **\**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting. -- `PROXY_HOSTS`: **\`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting. +- `PROXY_URL`: **_empty_**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting. +- `PROXY_HOSTS`: **_empty_`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting. ## Mailer (`mailer`) @@ -708,14 +706,14 @@ and [Gitea 1.17 configuration document](https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md) - `ENABLED`: **false**: Enable to use a mail service. -- `PROTOCOL`: **\**: Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._ +- `PROTOCOL`: **_empty_**: Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._ - SMTP family, if your provider does not explicitly say which protocol it uses but does provide a port, you can set SMTP_PORT instead and this will be inferred. - **sendmail** Use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems. - **dummy** Send email messages to the log as a testing phase. - Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`, `FROM`, `SUBJECT_PREFIX` and `SENDMAIL_PATH`. - Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`. -- `SMTP_ADDR`: **\**: Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. _Before 1.18, this was combined with `SMTP_PORT` under the name `HOST`._ -- `SMTP_PORT`: **\**: Mail server port. If no protocol is specified, it will be inferred by this setting. Common ports are listed below. _Before 1.18, this was combined with `SMTP_ADDR` under the name `HOST`._ +- `SMTP_ADDR`: **_empty_**: Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. _Before 1.18, this was combined with `SMTP_PORT` under the name `HOST`._ +- `SMTP_PORT`: **_empty_**: Mail server port. If no protocol is specified, it will be inferred by this setting. Common ports are listed below. _Before 1.18, this was combined with `SMTP_ADDR` under the name `HOST`._ - 25: insecure SMTP - 465: SMTP Secure - 587: StartTLS @@ -723,16 +721,16 @@ and - `CLIENT_CERT_FILE`: **custom/mailer/cert.pem**: Client certificate file. - `CLIENT_KEY_FILE`: **custom/mailer/key.pem**: Client key file. - `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`: **\**: Username of mailing user (usually the sender's e-mail address). -- `PASSWD`: **\**: 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/administration/email-setup.en-us.md" >}}) for more information. +- `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](administration/email-setup.md) for more information. - `ENABLE_HELO`: **true**: Enable HELO operation. - `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname. -- `FROM`: **\**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \ format. -- `ENVELOPE_FROM`: **\**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address. -- `SUBJECT_PREFIX`: **\**: Prefix to be placed before e-mail subject lines. +- `FROM`: **_empty_**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \ format. +- `ENVELOPE_FROM`: **_empty_**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address. +- `SUBJECT_PREFIX`: **_empty_**: Prefix to be placed before e-mail subject lines. - `SENDMAIL_PATH`: **sendmail**: The location of sendmail on the operating system (can be command or full path). -- `SENDMAIL_ARGS`: **\**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`) +- `SENDMAIL_ARGS`: **_empty_**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`) - `SENDMAIL_TIMEOUT`: **5m**: default timeout for sending email through sendmail - `SENDMAIL_CONVERT_CRLF`: **true**: Most versions of sendmail prefer LF line endings rather than CRLF line endings. Set this to false if your version of sendmail requires CRLF line endings. - `SEND_BUFFER_LEN`: **100**: Buffer length of mailing queue. **DEPRECATED** use `LENGTH` in `[queue.mailer]` @@ -741,11 +739,11 @@ and ## Incoming Email (`email.incoming`) - `ENABLED`: **false**: Enable handling of incoming emails. -- `REPLY_TO_ADDRESS`: **\**: The email address including the `%{token}` placeholder that will be replaced per user/action. Example: `incoming+%{token}@example.com`. The placeholder must appear in the user part of the address (before the `@`). -- `HOST`: **\**: IMAP server host. -- `PORT`: **\**: IMAP server port. -- `USERNAME`: **\**: Username of the receiving account. -- `PASSWORD`: **\**: Password of the receiving account. +- `REPLY_TO_ADDRESS`: **_empty_**: The email address including the `%{token}` placeholder that will be replaced per user/action. Example: `incoming+%{token}@example.com`. The placeholder must appear in the user part of the address (before the `@`). +- `HOST`: **_empty_**: IMAP server host. +- `PORT`: **_empty_**: IMAP server port. +- `USERNAME`: **_empty_**: Username of the receiving account. +- `PASSWORD`: **_empty_**: Password of the receiving account. - `USE_TLS`: **false**: Whether the IMAP server uses TLS. - `SKIP_TLS_VERIFY`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe. - `MAILBOX`: **INBOX**: The mailbox name where incoming mail will end up. @@ -757,7 +755,7 @@ and - `ENABLED`: **true**: Enable the cache. - `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `redis-cluster`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.) - `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only. -- `HOST`: **\**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue. +- `HOST`: **_empty_**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue. - Redis: `redis://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` - Redis-cluster `redis+cluster://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` - Memcache: `127.0.0.1:9090;127.0.0.1:9091` @@ -778,7 +776,7 @@ and - `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID. - `GC_INTERVAL_TIME`: **86400**: GC interval in seconds. - `SESSION_LIFE_TIME`: **86400**: Session life time in seconds, default is 86400 (1 day) -- `DOMAIN`: **\**: Sets the cookie Domain +- `DOMAIN`: **_empty_**: Sets the cookie Domain - `SAME_SITE`: **lax** \[strict, lax, none\]: Set the SameSite setting for the cookie. ## Picture (`picture`) @@ -833,12 +831,12 @@ Default templates for project boards: ## Log (`log`) -- `ROOT_PATH`: **\**: Root path for log files. +- `ROOT_PATH`: **_empty_**: Root path for log files. - `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values. You can configure each mode in per mode log subsections `\[log.writer-mode-name\]`. - `LEVEL`: **Info**: General log level. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\] - `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces (rarely useful, do not set it). \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\] - `ENABLE_SSH_LOG`: **false**: save ssh log to log file -- `logger.access.MODE`: **\**: The "access" logger +- `logger.access.MODE`: **_empty_**: The "access" logger - `logger.router.MODE`: **,**: The "router" logger, a single comma means it will use the default MODE above - `logger.xorm.MODE`: **,**: The "xorm" logger @@ -852,7 +850,7 @@ Default templates for project boards: - `ResponseWriter`: the responseWriter from the request. - `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched). - You must be very careful to ensure that this template does not throw errors or panics as this template runs outside the panic/recovery script. -- `REQUEST_ID_HEADERS`: **\**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log. +- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log. - e.g. - In the Request Header: X-Request-ID: **test-id-123** - Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID @@ -920,7 +918,7 @@ Default templates for project boards: - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check. - `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout. -- `ARGS`: **\**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck +- `ARGS`: **_empty_**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck #### Cron - Repository Statistics Check (`cron.check_repo_stats`) @@ -962,7 +960,7 @@ Default templates for project boards: - `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. - `TIMEOUT`: **60s**: Time duration syntax for garbage collection execution timeout. - `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices. -- `ARGS`: **\**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS +- `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`) @@ -1044,7 +1042,7 @@ Default templates for project boards: - `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view. - `COMMITS_RANGE_SIZE`: **50**: Set the default commits range size - `BRANCHES_RANGE_SIZE`: **20**: Set the default branches range size -- `GC_ARGS`: **\**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/ +- `GC_ARGS`: **_empty_**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/ - `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use Git wire protocol version 2 when Git version >= 2.18, default is true, set to false when you always want Git wire protocol version 1. To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file. - `PULL_REQUEST_PUSH_MESSAGE`: **true**: Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled) @@ -1077,7 +1075,7 @@ This section only does "set" config, a removed config key from this section won' - `ENABLED`: **false**: Enables /metrics endpoint for prometheus. - `ENABLED_ISSUE_BY_LABEL`: **false**: Enable issue by label metrics with format `gitea_issues_by_label{label="bug"} 2`. - `ENABLED_ISSUE_BY_REPOSITORY`: **false**: Enable issue by repository metrics with format `gitea_issues_by_repository{repository="org/repo"} 5`. -- `TOKEN`: **\**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`. +- `TOKEN`: **_empty_**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`. ## API (`api`) @@ -1094,7 +1092,7 @@ This section only does "set" config, a removed config key from this section won' - `REFRESH_TOKEN_EXPIRATION_TIME`: **730**: Lifetime of an OAuth2 refresh token in hours - `INVALIDATE_REFRESH_TOKENS`: **false**: Check if refresh token has already been used - `JWT_SIGNING_ALGORITHM`: **RS256**: Algorithm used to sign OAuth2 tokens. Valid values: \[`HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`\] -- `JWT_SECRET`: **\**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`. +- `JWT_SECRET`: **_empty_**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`. - `JWT_SIGNING_PRIVATE_KEY_FILE`: **jwt/private.pem**: Private key file path used to sign OAuth2 tokens. The path is relative to `APP_DATA_PATH`. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `RS256`, `RS384`, `RS512`, `ES256`, `ES384` or `ES512`. The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you. - `MAX_TOKEN_LENGTH`: **32767**: Maximum length of token/cookie to accept from OAuth2 provider @@ -1121,7 +1119,7 @@ IS_INPUT_FILE = false - ENABLED: **false** Enable markup support; set to **true** to enable this renderer. - NEED\_POSTPROCESS: **true** set to **true** to replace links / sha1 and etc. -- FILE\_EXTENSIONS: **\** List of file extensions that should be rendered by an external +- FILE\_EXTENSIONS: **_empty_** List of file extensions that should be rendered by an external command. Multiple extensions needs a comma as splitter. - RENDER\_COMMAND: External command to render all matching extensions. - IS\_INPUT\_FILE: **false** Input is not a standard input but a file param followed `RENDER_COMMAND`. @@ -1180,8 +1178,8 @@ Task queue configuration has been moved to `queue.task`. However, the below conf - `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations. - `RETRY_BACKOFF`: **3**: Backoff time per http/https request retry (seconds) -- `ALLOWED_DOMAINS`: **\**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas. Wildcard is supported: `github.com, *.github.com`. -- `BLOCKED_DOMAINS`: **\**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option has a higher priority to deny domains. Wildcard is supported. +- `ALLOWED_DOMAINS`: **_empty_**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas. Wildcard is supported: `github.com, *.github.com`. +- `BLOCKED_DOMAINS`: **_empty_**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option has a higher priority to deny domains. Wildcard is supported. - `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291. If a domain is allowed by `ALLOWED_DOMAINS`, this option will be ignored. - `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify @@ -1360,8 +1358,8 @@ is `data/repo-archive` and the default of `MINIO_BASE_PATH` is `repo-archive/`. ## Proxy (`proxy`) - `PROXY_ENABLED`: **false**: Enable the proxy if true, all requests to external via HTTP will be affected, if false, no proxy will be used even environment http_proxy/https_proxy -- `PROXY_URL`: **\**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy -- `PROXY_HOSTS`: **\**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. +- `PROXY_URL`: **_empty_**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy +- `PROXY_HOSTS`: **_empty_**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. i.e. diff --git a/doc/administration/config-cheat-sheet.zh-cn.md b/administration/config-cheat-sheet.zh-cn.md similarity index 96% rename from doc/administration/config-cheat-sheet.zh-cn.md rename to administration/config-cheat-sheet.zh-cn.md index d0af323d..a2fa25df 100644 --- a/doc/administration/config-cheat-sheet.zh-cn.md +++ b/administration/config-cheat-sheet.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-26T16:00:00+02:00" title: "配置说明" slug: "config-cheat-sheet" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "配置说明" - weight: 30 + sidebar_position: 30 identifier: "config-cheat-sheet" --- @@ -26,8 +26,6 @@ menu: 此文档的内容可能过于陈旧或者错误,请参考英文文档。 -{{< toc >}} - ## Overall (`DEFAULT`) - `APP_NAME`: 应用名称,改成你希望的名字。 @@ -46,7 +44,7 @@ menu: ### Repository - Release (`repository.release`) -- `ALLOWED_TYPES`: **\**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。 +- `ALLOWED_TYPES`: **_empty_**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。 - `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。 ## UI (`ui`) @@ -187,7 +185,7 @@ menu: - `ENABLED`: **true**: 是否启用。 - `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。 - `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。 -- `HOST`: **\**: 针对redis和memcache有效,主机地址和端口。 +- `HOST`: **_empty_**: 针对redis和memcache有效,主机地址和端口。 - Redis: `network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180` - Memache: `127.0.0.1:9090;127.0.0.1:9091` - `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。 @@ -392,8 +390,8 @@ ALLOW_DATA_URI_IMAGES = true - `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。 - `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。 -- `ALLOWED_DOMAINS`: **\**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。 -- `BLOCKED_DOMAINS`: **\**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。 +- `ALLOWED_DOMAINS`: **_empty_**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。 +- `BLOCKED_DOMAINS`: **_empty_**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。 - `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918 - `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证 @@ -515,8 +513,8 @@ Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配 ## Proxy (`proxy`) - `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用 -- `PROXY_URL`: **\**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy -- `PROXY_HOSTS`: **\**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站 +- `PROXY_URL`: **_empty_**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy +- `PROXY_HOSTS`: **_empty_**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站 i.e. diff --git a/doc/administration/customizing-gitea.en-us.md b/administration/customizing-gitea.en-us.md similarity index 96% rename from doc/administration/customizing-gitea.en-us.md rename to administration/customizing-gitea.en-us.md index 8ab0d355..ae05ca45 100644 --- a/doc/administration/customizing-gitea.en-us.md +++ b/administration/customizing-gitea.en-us.md @@ -2,7 +2,7 @@ date: "2017-04-15T14:56:00+02:00" title: "Customizing Gitea" slug: "customizing-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false aliases: @@ -12,7 +12,7 @@ menu: parent: "administration" name: "Customizing Gitea" identifier: "customizing-gitea" - weight: 100 + sidebar_position: 100 --- # Customizing Gitea @@ -48,10 +48,6 @@ is set under the "Configuration" tab on the site administration page. **Note:** Gitea must perform a full restart to see configuration changes. -**Table of Contents** - -{{< toc >}} - ## Serving custom public files To make Gitea serve custom public files (like pages and images), use the folder @@ -86,7 +82,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/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). +To obtain any embedded file (including templates), the [`gitea embedded` tool](administration/cmd-embedded.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. @@ -314,7 +310,7 @@ The [legacy file format](https://github.com/go-gitea/gitea/blob/main/options/lab `#hex-color label name ; label description` -For more information, see the [labels documentation]({{< relref "doc/usage/labels.en-us.md" >}}). +For more information, see the [labels documentation](usage/labels.md). ### Licenses diff --git a/doc/administration/customizing-gitea.zh-cn.md b/administration/customizing-gitea.zh-cn.md similarity index 98% rename from doc/administration/customizing-gitea.zh-cn.md rename to administration/customizing-gitea.zh-cn.md index 64115ba1..77b2fd83 100644 --- a/doc/administration/customizing-gitea.zh-cn.md +++ b/administration/customizing-gitea.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-04-15T14:56:00+02:00" title: "自定义 Gitea 配置" slug: "customizing-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "自定义 Gitea 配置" - weight: 100 + sidebar_position: 100 identifier: "customizing-gitea" --- diff --git a/doc/administration/email-setup.en-us.md b/administration/email-setup.en-us.md similarity index 94% rename from doc/administration/email-setup.en-us.md rename to administration/email-setup.en-us.md index 92ec95cc..2f92e204 100644 --- a/doc/administration/email-setup.en-us.md +++ b/administration/email-setup.en-us.md @@ -2,7 +2,7 @@ date: "2019-10-15T10:10:00+05:00" title: "Email setup" slug: "email-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Email setup" - weight: 12 + sidebar_position: 12 identifier: "email-setup" --- # Email setup -**Table of Contents** - -{{< toc >}} - Gitea has mailer functionality for sending transactional emails (such as registration confirmation). It can be configured to either use Sendmail (or compatible MTAs like Postfix and msmtp) or directly use SMTP server. ## Using Sendmail @@ -60,7 +56,7 @@ Restart Gitea for the configuration changes to take effect. To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration. -For the full list of options check the [Config Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}}) +For the full list of options check the [Config Cheat Sheet](administration/config-cheat-sheet.md) Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through: diff --git a/doc/administration/email-setup.zh-cn.md b/administration/email-setup.zh-cn.md similarity index 98% rename from doc/administration/email-setup.zh-cn.md rename to administration/email-setup.zh-cn.md index 0bbeebf2..e526a9d4 100644 --- a/doc/administration/email-setup.zh-cn.md +++ b/administration/email-setup.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Email 设置" slug: "email-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Email 设置" - weight: 12 + sidebar_position: 12 identifier: "email-setup" --- # Email 设置 -**目录** - -{{< toc >}} - Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮件)。它可以配置为使用 Sendmail(或兼容的 MTA,例如 Postfix 和 msmtp)或直接使用 SMTP 服务器。 ## 使用 Sendmail diff --git a/doc/administration/environment-variables.en-us.md b/administration/environment-variables.en-us.md similarity index 96% rename from doc/administration/environment-variables.en-us.md rename to administration/environment-variables.en-us.md index 261d1bea..f910cf06 100644 --- a/doc/administration/environment-variables.en-us.md +++ b/administration/environment-variables.en-us.md @@ -2,7 +2,7 @@ date: "2017-04-08T11:34:00+02:00" title: "Environment variables" slug: "environment-variables" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Environment variables" - weight: 10 + sidebar_position: 10 identifier: "environment-variables" --- # Environment variables -**Table of Contents** - -{{< toc >}} - This is an inventory of Gitea environment variables. They change Gitea behaviour. Initialize them before Gitea command to be effective, for example: diff --git a/doc/administration/environment-variables.zh-cn.md b/administration/environment-variables.zh-cn.md similarity index 97% rename from doc/administration/environment-variables.zh-cn.md rename to administration/environment-variables.zh-cn.md index cbc9787c..25e120be 100644 --- a/doc/administration/environment-variables.zh-cn.md +++ b/administration/environment-variables.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-04-08T11:34:00+02:00" title: "环境变量清单" slug: "environment-variables" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "环境变量清单" - weight: 10 + sidebar_position: 10 identifier: "environment-variables" --- diff --git a/doc/administration/external-renderers.en-us.md b/administration/external-renderers.en-us.md similarity index 98% rename from doc/administration/external-renderers.en-us.md rename to administration/external-renderers.en-us.md index 5e64bb84..66941980 100644 --- a/doc/administration/external-renderers.en-us.md +++ b/administration/external-renderers.en-us.md @@ -2,7 +2,7 @@ date: "2018-11-23:00:00+02:00" title: "External renderers" slug: "external-renderers" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "External renderers" - weight: 60 + sidebar_position: 60 identifier: "external-renderers" --- # Custom files rendering configuration -**Table of Contents** - -{{< toc >}} - Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries, it is just a matter of: @@ -36,7 +32,7 @@ In order to get file rendering through external binaries, their associated packa If you're using a Docker image, your `Dockerfile` should contain something along this lines: ```docker -FROM gitea/gitea:{{< version >}} +FROM gitea/gitea:@version@ [...] COPY custom/app.ini /data/gitea/conf/app.ini diff --git a/doc/administration/external-renderers.zh-cn.md b/administration/external-renderers.zh-cn.md similarity index 96% rename from doc/administration/external-renderers.zh-cn.md rename to administration/external-renderers.zh-cn.md index 26d3fb45..0b53b452 100644 --- a/doc/administration/external-renderers.zh-cn.md +++ b/administration/external-renderers.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "外部渲染器" slug: "external-renderers" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,23 +11,19 @@ menu: sidebar: parent: "administration" name: "外部渲染器" - weight: 60 + sidebar_position: 60 identifier: "external-renderers" --- # 自定义文件渲染配置 -**目录** - -{{< toc >}} - Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter notebooks、asciidoc 等),只需要进行以下步骤: - 安装外部二进制文件 - 在您的 `app.ini` 文件中添加一些配置 - 重新启动 Gitea 实例 -此功能支持整个文件的渲染。如果您想要在 Markdown 中渲染代码块,您需要使用 JavaScript 进行一些操作。请参阅 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}) 页面上的一些示例。 +此功能支持整个文件的渲染。如果您想要在 Markdown 中渲染代码块,您需要使用 JavaScript 进行一些操作。请参阅 [自定义 Gitea 配置](administration/customizing-gitea.md) 页面上的一些示例。 ## 安装外部二进制文件 @@ -35,7 +31,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no 如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容: ```docker -FROM gitea/gitea:{{< version >}} +FROM gitea/gitea:@version@ [...] COPY custom/app.ini /data/gitea/conf/app.ini diff --git a/doc/administration/fail2ban-setup.en-us.md b/administration/fail2ban-setup.en-us.md similarity index 98% rename from doc/administration/fail2ban-setup.en-us.md rename to administration/fail2ban-setup.en-us.md index 1638e0dd..5c0101ef 100644 --- a/doc/administration/fail2ban-setup.en-us.md +++ b/administration/fail2ban-setup.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-11T11:00:00+02:00" title: "Fail2ban Setup " slug: "fail2ban-setup" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Fail2ban setup" - weight: 16 + sidebar_position: 16 identifier: "fail2ban-setup" --- diff --git a/doc/administration/fail2ban-setup.zh-cn.md b/administration/fail2ban-setup.zh-cn.md similarity index 98% rename from doc/administration/fail2ban-setup.zh-cn.md rename to administration/fail2ban-setup.zh-cn.md index f4f3cff4..2ca0b3a7 100644 --- a/doc/administration/fail2ban-setup.zh-cn.md +++ b/administration/fail2ban-setup.zh-cn.md @@ -2,7 +2,7 @@ date: "2022-08-01T00:00:00+00:00" title: "设置 Fail2ban" slug: "fail2ban-setup" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "设置 Fail2ban" - weight: 16 + sidebar_position: 16 identifier: "fail2ban-setup" --- diff --git a/doc/administration/git-lfs-support.en-us.md b/administration/git-lfs-support.en-us.md similarity index 93% rename from doc/administration/git-lfs-support.en-us.md rename to administration/git-lfs-support.en-us.md index 884b1989..d2c55a29 100644 --- a/doc/administration/git-lfs-support.en-us.md +++ b/administration/git-lfs-support.en-us.md @@ -2,7 +2,7 @@ date: "2019-10-06T08:00:00+05:00" title: "Git LFS setup" slug: "git-lfs-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Git LFS setup" - weight: 12 + sidebar_position: 12 identifier: "git-lfs-setup" --- diff --git a/doc/administration/git-lfs-support.zh-cn.md b/administration/git-lfs-support.zh-cn.md similarity index 93% rename from doc/administration/git-lfs-support.zh-cn.md rename to administration/git-lfs-support.zh-cn.md index 247e9a47..268f40f3 100644 --- a/doc/administration/git-lfs-support.zh-cn.md +++ b/administration/git-lfs-support.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Git LFS 设置" slug: "git-lfs-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Git LFS 设置" - weight: 12 + sidebar_position: 12 identifier: "git-lfs-setup" --- diff --git a/doc/administration/https-support.en-us.md b/administration/https-support.en-us.md similarity index 96% rename from doc/administration/https-support.en-us.md rename to administration/https-support.en-us.md index d59ae2e8..6441663c 100644 --- a/doc/administration/https-support.en-us.md +++ b/administration/https-support.en-us.md @@ -2,7 +2,7 @@ date: "2018-06-02T11:00:00+02:00" title: "HTTPS setup" slug: "https-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,22 +11,18 @@ menu: sidebar: parent: "administration" name: "HTTPS setup" - weight: 12 + sidebar_position: 12 identifier: "https-setup" --- # HTTPS setup to encrypt connections to Gitea -**Table of Contents** - -{{< toc >}} - ## Using the built-in server 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/administration/reverse-proxies.en-us.md" >}}). +If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide](administration/reverse-proxies.md). To use Gitea's built-in HTTPS support, you must change your `app.ini` file: diff --git a/doc/administration/https-support.zh-cn.md b/administration/https-support.zh-cn.md similarity index 96% rename from doc/administration/https-support.zh-cn.md rename to administration/https-support.zh-cn.md index c67776b9..124242f7 100644 --- a/doc/administration/https-support.zh-cn.md +++ b/administration/https-support.zh-cn.md @@ -2,29 +2,25 @@ date: "2023-04-09T11:00:00+02:00" title: "HTTPS配置" slug: "https-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false menu: sidebar: parent: "administration" name: "HTTPS setup" - weight: 12 + sidebar_position: 12 identifier: "https-setup" --- # HTTPS setup to encrypt connections to Gitea -**Table of Contents** - -{{< toc >}} - ## 使用内置服务器 在启用HTTPS之前,确保您拥有有效的SSL/TLS证书。 建议在测试和评估情况下使用自签名证书,请运行 `gitea cert --host [HOST]` 以生成自签名证书 -如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 [反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})。 +如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 [反向代理指南](administration/reverse-proxies.md)。 要使用Gitea内置HTTPS支持,您必须编辑`app.ini`文件。 diff --git a/doc/administration/logging-config.en-us.md b/administration/logging-config.en-us.md similarity index 97% rename from doc/administration/logging-config.en-us.md rename to administration/logging-config.en-us.md index 857eb19b..d9739e18 100644 --- a/doc/administration/logging-config.en-us.md +++ b/administration/logging-config.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-02T17:06:00+01:00" title: "Logging Configuration" slug: "logging-config" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Logging Configuration" - weight: 40 + sidebar_position: 40 identifier: "logging-config" --- @@ -25,13 +25,9 @@ The logging configuration of Gitea mainly consists of 3 types of components: There is a fully functional log output by default, so it is not necessary to define one. -**Table of Contents** - -{{< toc >}} - ## Collecting Logs for Help -To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}). +To collect logs for help and issue report, see [Support Options](help/support.md). ## The `[log]` section @@ -47,7 +43,7 @@ In the top level `[log]` section the following configurations can be placed: And it can contain the following sub-loggers: - `logger.router.MODE`: (Default: **,**): List of log outputs to use for the Router logger. -- `logger.access.MODE`: (Default: **\**) List of log outputs to use for the Access logger. By default, the access logger is disabled. +- `logger.access.MODE`: (Default: **_empty_**) List of log outputs to use for the Access logger. By default, the access logger is disabled. - `logger.xorm.MODE`: (Default: **,**) List of log outputs to use for the XORM logger. Setting a comma (`,`) to sub-logger's mode means making it use the default global `MODE`. diff --git a/doc/administration/logging-config.zh-cn.md b/administration/logging-config.zh-cn.md similarity index 97% rename from doc/administration/logging-config.zh-cn.md rename to administration/logging-config.zh-cn.md index 1edf1443..273a4135 100644 --- a/doc/administration/logging-config.zh-cn.md +++ b/administration/logging-config.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "日志配置" slug: "logging-config" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "日志配置" - weight: 40 + sidebar_position: 40 identifier: "logging-config" --- @@ -25,13 +25,9 @@ Gitea 的日志配置主要由以下三种类型的组件组成: 默认情况下,已经有一个完全功能的日志输出,因此不需要重新定义。 -**目录** - -{{< toc >}} - ## 收集日志以获取帮助 -要收集日志以获取帮助和报告问题,请参阅 [需要帮助]({{< relref "doc/help/support.zh-cn.md" >}})。 +要收集日志以获取帮助和报告问题,请参阅 [需要帮助](help/support.md)。 ## `[log]` 部分 @@ -47,7 +43,7 @@ Gitea 的日志配置主要由以下三种类型的组件组成: 它还可以包含以下子日志记录器: - `logger.router.MODE`:(默认值:**,**):用于路由器日志记录器的日志输出列表。 -- `logger.access.MODE`:(默认值:**\**):用于访问日志记录器的日志输出列表。默认情况下,访问日志记录器被禁用。 +- `logger.access.MODE`:(默认值:**_empty_**):用于访问日志记录器的日志输出列表。默认情况下,访问日志记录器被禁用。 - `logger.xorm.MODE`:(默认值:**,**):用于 XORM 日志记录器的日志输出列表。 将子日志记录器的模式设置为逗号(`,`)表示使用默认的全局 `MODE`。 diff --git a/doc/administration/mail-templates.en-us.md b/administration/mail-templates.en-us.md similarity index 99% rename from doc/administration/mail-templates.en-us.md rename to administration/mail-templates.en-us.md index 0740ccaa..d66108f2 100644 --- a/doc/administration/mail-templates.en-us.md +++ b/administration/mail-templates.en-us.md @@ -2,7 +2,7 @@ date: "2019-10-23T17:00:00-03:00" title: "Mail templates" slug: "mail-templates" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Mail templates" - weight: 45 + sidebar_position: 45 identifier: "mail-templates" --- # Mail templates -**Table of Contents** - -{{< toc >}} - To craft the e-mail subject and contents for certain operations, Gitea can be customized by using templates. The templates for these functions are located under the [`custom` directory](https://docs.gitea.io/en-us/customizing-gitea/). Gitea has an internal template that serves as default in case there's no custom alternative. diff --git a/doc/administration/mail-templates.zh-cn.md b/administration/mail-templates.zh-cn.md similarity index 99% rename from doc/administration/mail-templates.zh-cn.md rename to administration/mail-templates.zh-cn.md index 3b030900..49f8b977 100644 --- a/doc/administration/mail-templates.zh-cn.md +++ b/administration/mail-templates.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "邮件模板" slug: "mail-templates" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "邮件模板" - weight: 45 + sidebar_position: 45 identifier: "mail-templates" --- # 邮件模板 -**目录** - -{{< toc >}} - 为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](https://docs.gitea.io/en-us/customizing-gitea/) 下。 如果没有自定义的替代方案,Gitea 将使用内部模板作为默认模板。 diff --git a/doc/administration/repo-indexer.en-us.md b/administration/repo-indexer.en-us.md similarity index 97% rename from doc/administration/repo-indexer.en-us.md rename to administration/repo-indexer.en-us.md index a1980bc5..71eb4ffb 100644 --- a/doc/administration/repo-indexer.en-us.md +++ b/administration/repo-indexer.en-us.md @@ -2,7 +2,7 @@ date: "2019-09-06T01:35:00-03:00" title: "Repository indexer" slug: "repo-indexer" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Repository indexer" - weight: 45 + sidebar_position: 45 identifier: "repo-indexer" --- # Repository indexer -**Table of Contents** - -{{< toc >}} - ## Setting up the repository indexer Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/): diff --git a/doc/administration/repo-indexer.zh-cn.md b/administration/repo-indexer.zh-cn.md similarity index 97% rename from doc/administration/repo-indexer.zh-cn.md rename to administration/repo-indexer.zh-cn.md index 621710e3..157bfd97 100644 --- a/doc/administration/repo-indexer.zh-cn.md +++ b/administration/repo-indexer.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "仓库索引器" slug: "repo-indexer" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "仓库索引器" - weight: 45 + sidebar_position: 45 identifier: "repo-indexer" --- # 仓库索引器 -**目录** - -{{< toc >}} - ## 设置仓库索引器 通过在您的 [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/) 中启用此功能,Gitea 可以通过仓库的文件进行搜索: diff --git a/doc/administration/reverse-proxies.en-us.md b/administration/reverse-proxies.en-us.md similarity index 99% rename from doc/administration/reverse-proxies.en-us.md rename to administration/reverse-proxies.en-us.md index 7272eb5a..ca066364 100644 --- a/doc/administration/reverse-proxies.en-us.md +++ b/administration/reverse-proxies.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-22T11:00:00+00:00" title: "Reverse Proxies" slug: "reverse-proxies" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Reverse Proxies" - weight: 16 + sidebar_position: 16 identifier: "reverse-proxies" --- # Reverse Proxies -**Table of Contents** - -{{< toc >}} - ## Nginx If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`: diff --git a/doc/administration/reverse-proxies.zh-cn.md b/administration/reverse-proxies.zh-cn.md similarity index 98% rename from doc/administration/reverse-proxies.zh-cn.md rename to administration/reverse-proxies.zh-cn.md index 63c7c249..4c7de782 100644 --- a/doc/administration/reverse-proxies.zh-cn.md +++ b/administration/reverse-proxies.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-05-22T11:00:00+00:00" title: "反向代理" slug: "reverse-proxies" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "反向代理" - weight: 16 + sidebar_position: 16 identifier: "reverse-proxies" --- # 反向代理 -**目录** - -{{< toc >}} - ## 使用 Nginx 作为反向代理服务 如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server` 的 `http` 部分: diff --git a/doc/administration/search-engines-indexation.en-us.md b/administration/search-engines-indexation.en-us.md similarity index 91% rename from doc/administration/search-engines-indexation.en-us.md rename to administration/search-engines-indexation.en-us.md index 27427531..7898e814 100644 --- a/doc/administration/search-engines-indexation.en-us.md +++ b/administration/search-engines-indexation.en-us.md @@ -2,7 +2,7 @@ date: "2019-12-31T13:55:00+05:00" title: "Search Engines Indexation" slug: "search-engines-indexation" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Search Engines Indexation" - weight: 60 + sidebar_position: 60 identifier: "search-engines-indexation" --- @@ -23,7 +23,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/administration/customizing-gitea.en-us.md" >}}) +create a file called `robots.txt` in the [`custom` folder or `CustomPath`](administration/customizing-gitea.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). diff --git a/doc/administration/search-engines-indexation.zh-cn.md b/administration/search-engines-indexation.zh-cn.md similarity index 87% rename from doc/administration/search-engines-indexation.zh-cn.md rename to administration/search-engines-indexation.zh-cn.md index 4f9d18af..77ad5eca 100644 --- a/doc/administration/search-engines-indexation.zh-cn.md +++ b/administration/search-engines-indexation.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "搜索引擎索引" slug: "search-engines-indexation" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "搜索引擎索引" - weight: 60 + sidebar_position: 60 identifier: "search-engines-indexation" --- @@ -22,7 +22,7 @@ menu: ## 使用 robots.txt 阻止搜索引擎索引 -为了使 Gitea 为顶级安装提供自定义的`robots.txt`(默认为空的 404),请在[`custom`文件夹或`CustomPath`]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})中创建一个名为 `robots.txt` 的文件。 +为了使 Gitea 为顶级安装提供自定义的`robots.txt`(默认为空的 404),请在[`custom`文件夹或`CustomPath`](administration/customizing-gitea.md)中创建一个名为 `robots.txt` 的文件。 有关如何配置 `robots.txt` 的示例,请参考 [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt)。 diff --git a/doc/administration/signing.en-us.md b/administration/signing.en-us.md similarity index 98% rename from doc/administration/signing.en-us.md rename to administration/signing.en-us.md index de539e34..837af14b 100644 --- a/doc/administration/signing.en-us.md +++ b/administration/signing.en-us.md @@ -2,7 +2,7 @@ date: "2019-08-17T10:20:00+01:00" title: "GPG Commit Signatures" slug: "signing" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "GPG Commit Signatures" - weight: 50 + sidebar_position: 50 identifier: "signing" --- # GPG Commit Signatures -**Table of Contents** - -{{< toc >}} - Gitea will verify GPG commit signatures in the provided tree by checking if the commits are signed by a key within the Gitea database, or if the commit matches the default key for Git. diff --git a/doc/administration/signing.zh-cn.md b/administration/signing.zh-cn.md similarity index 99% rename from doc/administration/signing.zh-cn.md rename to administration/signing.zh-cn.md index 41c3e678..5910b1bf 100644 --- a/doc/administration/signing.zh-cn.md +++ b/administration/signing.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "GPG 提交签名" slug: "signing" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "GPG 提交签名" - weight: 50 + sidebar_position: 50 identifier: "signing" --- # GPG 提交签名 -**目录** - -{{< toc >}} - Gitea 将通过检查提交是否由 Gitea 数据库中的密钥签名,或者提交是否与 Git 的默认密钥匹配,来验证提供的树中的 GPG 提交签名。 密钥不会被检查以确定它们是否已过期或撤销。密钥也不会与密钥服务器进行检查。 diff --git a/doc/contributing.en-us.md b/contributing.en-us.md similarity index 79% rename from doc/contributing.en-us.md rename to contributing.en-us.md index 6cc96d91..8cd2e2bd 100644 --- a/doc/contributing.en-us.md +++ b/contributing.en-us.md @@ -2,12 +2,12 @@ date: "2021-01-22T00:00:00+02:00" title: "Contributing" slug: "contributing" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Contributing" - weight: 50 + sidebar_position: 50 identifier: "contributing" --- diff --git a/doc/contributing.fr-fr.md b/contributing.fr-fr.md similarity index 79% rename from doc/contributing.fr-fr.md rename to contributing.fr-fr.md index 31756683..9dc4aa6c 100644 --- a/doc/contributing.fr-fr.md +++ b/contributing.fr-fr.md @@ -2,12 +2,12 @@ date: "2021-01-22T00:00:00+02:00" title: "Übersetzung" slug: "contributing" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Übersetzung" - weight: 50 + sidebar_position: 50 identifier: "contributing" --- diff --git a/doc/contributing.zh-tw.md b/contributing.zh-tw.md similarity index 78% rename from doc/contributing.zh-tw.md rename to contributing.zh-tw.md index 73a3f94a..0c715eef 100644 --- a/doc/contributing.zh-tw.md +++ b/contributing.zh-tw.md @@ -2,12 +2,12 @@ date: "2021-01-22T00:00:00+02:00" title: "貢獻" slug: "contributing" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "貢獻" - weight: 50 + sidebar_position: 50 identifier: "contributing" --- diff --git a/doc/contributing/_index.de-de.md b/contributing/_index.de-de.md similarity index 100% rename from doc/contributing/_index.de-de.md rename to contributing/_index.de-de.md diff --git a/doc/contributing/_index.en-us.md b/contributing/_index.en-us.md similarity index 100% rename from doc/contributing/_index.en-us.md rename to contributing/_index.en-us.md diff --git a/doc/contributing/_index.zh-cn.md b/contributing/_index.zh-cn.md similarity index 100% rename from doc/contributing/_index.zh-cn.md rename to contributing/_index.zh-cn.md diff --git a/doc/contributing/_index.zh-tw.md b/contributing/_index.zh-tw.md similarity index 100% rename from doc/contributing/_index.zh-tw.md rename to contributing/_index.zh-tw.md diff --git a/doc/contributing/guidelines-backend.en-us.md b/contributing/guidelines-backend.en-us.md similarity index 99% rename from doc/contributing/guidelines-backend.en-us.md rename to contributing/guidelines-backend.en-us.md index 283fbdf3..084b3886 100644 --- a/doc/contributing/guidelines-backend.en-us.md +++ b/contributing/guidelines-backend.en-us.md @@ -2,7 +2,7 @@ date: "2021-11-01T23:41:00+08:00" title: "Guidelines for Backend Development" slug: "guidelines-backend" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "Guidelines for Backend" - weight: 20 + sidebar_position: 20 identifier: "guidelines-backend" --- # Guidelines for Backend Development -**Table of Contents** - -{{< toc >}} - ## Background Gitea uses Golang as the backend programming language. It uses many third-party packages and also write some itself. diff --git a/doc/contributing/guidelines-backend.zh-cn.md b/contributing/guidelines-backend.zh-cn.md similarity index 99% rename from doc/contributing/guidelines-backend.zh-cn.md rename to contributing/guidelines-backend.zh-cn.md index c94d4305..33129dc0 100644 --- a/doc/contributing/guidelines-backend.zh-cn.md +++ b/contributing/guidelines-backend.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T23:41:00+08:00" title: "后端开发指南" slug: "guidelines-backend" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "后端开发指南" - weight: 20 + sidebar_position: 20 identifier: "guidelines-backend" --- # 后端开发指南 -**目录** - -{{< toc >}} - ## 背景 Gitea使用Golang作为后端编程语言。它使用了许多第三方包,并且自己也编写了一些包。 diff --git a/doc/contributing/guidelines-frontend.en-us.md b/contributing/guidelines-frontend.en-us.md similarity index 98% rename from doc/contributing/guidelines-frontend.en-us.md rename to contributing/guidelines-frontend.en-us.md index fcbd81b2..3ec18518 100644 --- a/doc/contributing/guidelines-frontend.en-us.md +++ b/contributing/guidelines-frontend.en-us.md @@ -2,7 +2,7 @@ date: "2021-10-13T16:00:00+02:00" title: "Guidelines for Frontend Development" slug: "guidelines-frontend" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "Guidelines for Frontend" - weight: 30 + sidebar_position: 30 identifier: "guidelines-frontend" --- # Guidelines for Frontend Development -**Table of Contents** - -{{< toc >}} - ## Background Gitea uses [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend. diff --git a/doc/contributing/guidelines-frontend.zh-cn.md b/contributing/guidelines-frontend.zh-cn.md similarity index 99% rename from doc/contributing/guidelines-frontend.zh-cn.md rename to contributing/guidelines-frontend.zh-cn.md index 3a58db0c..66a4d4b4 100644 --- a/doc/contributing/guidelines-frontend.zh-cn.md +++ b/contributing/guidelines-frontend.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T16:00:00+02:00" title: "前端开发指南" slug: "guidelines-frontend" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "前端开发指南" - weight: 20 + sidebar_position: 20 identifier: "guidelines-frontend" --- # 前端开发指南 -**目录** - -{{< toc >}} - ## 背景 Gitea 在其前端中使用[Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html)(基于[jQuery](https://api.jquery.com))和 [Vue3](https://vuejs.org/)。 diff --git a/doc/contributing/guidelines-refactoring.en-us.md b/contributing/guidelines-refactoring.en-us.md similarity index 97% rename from doc/contributing/guidelines-refactoring.en-us.md rename to contributing/guidelines-refactoring.en-us.md index dce2845d..5d368a12 100644 --- a/doc/contributing/guidelines-refactoring.en-us.md +++ b/contributing/guidelines-refactoring.en-us.md @@ -2,7 +2,7 @@ date: "2023-02-14T00:00:00+00:00" title: "Guidelines for Refactoring" slug: "guidelines-refactoring" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "Guidelines for Refactoring" - weight: 40 + sidebar_position: 40 identifier: "guidelines-refactoring" --- # Guidelines for Refactoring -**Table of Contents** - -{{< toc >}} - ## Background Since the first line of code was written at Feb 12, 2014, Gitea has grown to be a large project. diff --git a/doc/contributing/guidelines-refactoring.zh-cn.md b/contributing/guidelines-refactoring.zh-cn.md similarity index 97% rename from doc/contributing/guidelines-refactoring.zh-cn.md rename to contributing/guidelines-refactoring.zh-cn.md index 9356fbd1..d65fe486 100644 --- a/doc/contributing/guidelines-refactoring.zh-cn.md +++ b/contributing/guidelines-refactoring.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T00:00:00+00:00" title: "重构指南" slug: "guidelines-refactoring" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "重构指南" - weight: 20 + sidebar_position: 20 identifier: "guidelines-refactoring" --- # 重构指南 -**目录** - -{{< toc >}} - ## 背景 自2014年2月12日编写了第一行代码以来,Gitea已经发展成为一个庞大的项目。 diff --git a/doc/contributing/localization.de-de.md b/contributing/localization.de-de.md similarity index 97% rename from doc/contributing/localization.de-de.md rename to contributing/localization.de-de.md index c4dcb6ca..07411792 100644 --- a/doc/contributing/localization.de-de.md +++ b/contributing/localization.de-de.md @@ -2,14 +2,14 @@ date: "2021-01-22T00:00:00+02:00" title: "Übersetzungs Richtlinien" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false menu: sidebar: parent: "contributing" name: "Übersetzungsrichtlinien" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/doc/contributing/localization.en-us.md b/contributing/localization.en-us.md similarity index 96% rename from doc/contributing/localization.en-us.md rename to contributing/localization.en-us.md index c9591254..05ff5ee1 100644 --- a/doc/contributing/localization.en-us.md +++ b/contributing/localization.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Localization" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "contributing" name: "Localization" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/doc/contributing/localization.zh-cn.md b/contributing/localization.zh-cn.md similarity index 95% rename from doc/contributing/localization.zh-cn.md rename to contributing/localization.zh-cn.md index 659a4733..9f2353e0 100644 --- a/doc/contributing/localization.zh-cn.md +++ b/contributing/localization.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "本地化" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "contributing" name: "本地化" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/doc/contributing/localization.zh-tw.md b/contributing/localization.zh-tw.md similarity index 95% rename from doc/contributing/localization.zh-tw.md rename to contributing/localization.zh-tw.md index 43c67800..b045d26b 100644 --- a/doc/contributing/localization.zh-tw.md +++ b/contributing/localization.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "在地化" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "contributing" name: "在地化" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/doc/contributing/translation.zh-cn.md b/contributing/translation.zh-cn.md similarity index 87% rename from doc/contributing/translation.zh-cn.md rename to contributing/translation.zh-cn.md index 8082c30b..80ce6fd7 100644 --- a/doc/contributing/translation.zh-cn.md +++ b/contributing/translation.zh-cn.md @@ -1,14 +1,14 @@ --- date: "2023-05-25T00:00:00+02:00" title: "翻译指南" -weight: 70 +sidebar_position: 70 toc: true draft: false menu: sidebar: parent: "contributing" name: "翻译指南" - weight: 70 + sidebar_position: 70 identifier: "translation-guidelines" --- diff --git a/doc/development.en-us.md b/development.en-us.md similarity index 79% rename from doc/development.en-us.md rename to development.en-us.md index e9e8b9c8..92201b1f 100644 --- a/doc/development.en-us.md +++ b/development.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "Development" slug: "development" -weight: 40 +sidebar_position: 40 toc: false draft: false menu: sidebar: name: "Development" - weight: 40 + sidebar_position: 40 identifier: "development" --- diff --git a/doc/development.zh-cn.md b/development.zh-cn.md similarity index 78% rename from doc/development.zh-cn.md rename to development.zh-cn.md index bbdaec4d..4992b313 100644 --- a/doc/development.zh-cn.md +++ b/development.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "开发" slug: "development" -weight: 40 +sidebar_position: 40 toc: false draft: false menu: sidebar: name: "开发" - weight: 40 + sidebar_position: 40 identifier: "development" --- diff --git a/doc/development.zh-tw.md b/development.zh-tw.md similarity index 78% rename from doc/development.zh-tw.md rename to development.zh-tw.md index a0fbbf21..2c9d335f 100644 --- a/doc/development.zh-tw.md +++ b/development.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "開發" slug: "development" -weight: 40 +sidebar_position: 40 toc: false draft: false menu: sidebar: name: "開發" - weight: 40 + sidebar_position: 40 identifier: "development" --- diff --git a/doc/development/_index.en-us.md b/development/_index.en-us.md similarity index 100% rename from doc/development/_index.en-us.md rename to development/_index.en-us.md diff --git a/doc/development/_index.zh-cn.md b/development/_index.zh-cn.md similarity index 100% rename from doc/development/_index.zh-cn.md rename to development/_index.zh-cn.md diff --git a/doc/development/_index.zh-tw.md b/development/_index.zh-tw.md similarity index 100% rename from doc/development/_index.zh-tw.md rename to development/_index.zh-tw.md diff --git a/doc/development/api-usage.en-us.md b/development/api-usage.en-us.md similarity index 98% rename from doc/development/api-usage.en-us.md rename to development/api-usage.en-us.md index 4f5304ac..a49c145b 100644 --- a/doc/development/api-usage.en-us.md +++ b/development/api-usage.en-us.md @@ -2,7 +2,7 @@ date: "2018-06-24:00:00+02:00" title: "API Usage" slug: "api-usage" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "API Usage" - weight: 40 + sidebar_position: 40 identifier: "api-usage" --- # API Usage -**Table of Contents** - -{{< toc >}} - ## Enabling/configuring API access By default, `ENABLE_SWAGGER` is true, and diff --git a/doc/development/api-usage.zh-cn.md b/development/api-usage.zh-cn.md similarity index 98% rename from doc/development/api-usage.zh-cn.md rename to development/api-usage.zh-cn.md index ceb69b3f..ca5909e5 100644 --- a/doc/development/api-usage.zh-cn.md +++ b/development/api-usage.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-06-24:00:00+02:00" title: "API 使用指南" slug: "api-usage" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "API 使用指南" - weight: 40 + sidebar_position: 40 identifier: "api-usage" --- diff --git a/doc/development/hacking-on-gitea.en-us.md b/development/hacking-on-gitea.en-us.md similarity index 95% rename from doc/development/hacking-on-gitea.en-us.md rename to development/hacking-on-gitea.en-us.md index 0f999215..e8d24ca7 100644 --- a/doc/development/hacking-on-gitea.en-us.md +++ b/development/hacking-on-gitea.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Hacking on Gitea" slug: "hacking-on-gitea" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "Hacking on Gitea" - weight: 10 + sidebar_position: 10 identifier: "hacking-on-gitea" --- # Hacking on Gitea -**Table of Contents** - -{{< toc >}} - ## Quickstart To get a quick working development environment you could use Gitpod. @@ -34,7 +30,7 @@ environment correctly. Next, [install Node.js with npm](https://nodejs.org/en/download/) which is required to build the JavaScript and CSS files. The minimum supported Node.js -version is {{< min-node-version >}} and the latest LTS version is recommended. +version is @minNodeVersion@ and the latest LTS version is recommended. **Note**: When executing make tasks that require external tools, like `make watch-backend`, Gitea will automatically download and build these as @@ -42,11 +38,11 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory on the executable path. If you don't add the go bin directory to the executable path you will have to manage this yourself. -**Note 2**: Go version {{< min-go-version >}} or higher is required. +**Note 2**: Go version @minGoVersion@ or higher is required. Gitea uses `gofmt` to format source code. However, the results of `gofmt` can differ by the version of `go`. Therefore it is recommended to install the version of Go that our continuous integration is -running. As of last update, the Go version should be {{< go-version >}}. +running. As of last update, the Go version should be @goVersion@. ## Installing Make @@ -123,8 +119,8 @@ to the Gitea sources. Otherwise, changes can't be pushed. ## Building Gitea (Basic) Take a look at our -[instructions]({{< relref "doc/installation/from-source.en-us.md" >}}) -for [building from source]({{< relref "doc/installation/from-source.en-us.md" >}}). +[instructions](installation/from-source.md) +for [building from source](installation/from-source.md). The simplest recommended way to build from source is: @@ -178,7 +174,7 @@ server as mentioned above. ### Working on JS and CSS -Frontend development should follow [Guidelines for Frontend Development]({{< relref "doc/contributing/guidelines-frontend.en-us.md" >}}) +Frontend development should follow [Guidelines for Frontend Development](contributing/guidelines-frontend.md) To build with frontend resources, either use the `watch-frontend` target mentioned above or just build once: @@ -265,7 +261,7 @@ 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 -[configuration cheat sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}}) +[configuration cheat sheet](administration/config-cheat-sheet.md) found in `docs/content/doc/administer/config-cheat-sheet.en-us.md` ### Changing the logo diff --git a/doc/development/hacking-on-gitea.zh-cn.md b/development/hacking-on-gitea.zh-cn.md similarity index 94% rename from doc/development/hacking-on-gitea.zh-cn.md rename to development/hacking-on-gitea.zh-cn.md index 6f0ce6bc..8e32c4c2 100644 --- a/doc/development/hacking-on-gitea.zh-cn.md +++ b/development/hacking-on-gitea.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "玩转 Gitea" slug: "hacking-on-gitea" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "玩转 Gitea" - weight: 10 + sidebar_position: 10 identifier: "hacking-on-gitea" --- # Hacking on Gitea -**目录** - -{{< toc >}} - ## 快速入门 要获得快速工作的开发环境,您可以使用 Gitpod。 @@ -32,7 +28,7 @@ menu: 您需要 [安装 go]( https://golang.org/doc/install ) 并设置您的 go 环境。 接下来,[使用 npm 安装 Node.js](https://nodejs.org/en/download/) ,这是构建 -JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 {{< min-node-version >}} +JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 @minNodeVersion@ 并且推荐使用最新的 LTS 版本。 **注意** :当执行需要外部工具的 make 任务时,比如 @@ -40,9 +36,9 @@ JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 {{< 将 `"$GOPATH"/bin` 目录加入到可执行路径上。如果你不把go bin目录添加到可执行路径你必须手动 指定可执行程序路径。 -**注意2** :Go版本 {{< min-go-version >}} 或更高版本是必须的。Gitea 使用 `gofmt` 来 +**注意2** :Go版本 @minGoVersion@ 或更高版本是必须的。Gitea 使用 `gofmt` 来 格式化源代码。然而,`gofmt` 的结果可能因 `go` 的版本而有差异。因此推荐安装我们持续集成使用 -的 Go版本。截至上次更新,Go 版本应该是 {{< go-version >}}。 +的 Go版本。截至上次更新,Go 版本应该是 @goVersion@。 ## 安装 Make @@ -115,8 +111,8 @@ git fetch --all --prune ## 构建 Gitea(基本) 看看我们的 -[说明]({{< relref "doc/installation/from-source.zh-cn.md" >}}) -关于如何[从源代码构建]({{< relref "doc/installation/from-source.zh-cn.md" >}}) 。 +[说明](installation/from-source.md) +关于如何[从源代码构建](installation/from-source.md) 。 从源代码构建的最简单推荐方法是: @@ -168,7 +164,7 @@ make lint-backend ### 处理 JS 和 CSS -前端开发应遵循 [Guidelines for Frontend Development]({{< relref "doc/contributing/guidelines-frontend.zh-cn.md" >}})。 +前端开发应遵循 [Guidelines for Frontend Development](contributing/guidelines-frontend.md)。 要使用前端资源构建,请使用上面提到的“watch-frontend”目标或只构建一次: @@ -249,7 +245,7 @@ make swagger-check ### 创建新的配置选项 创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini` -并到[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md" >}}) +并到[配置备忘单](administration/config-cheat-sheet.md) 在 `docs/content/doc/advanced/config-cheat-sheet.zh-cn.md` 中找到 ### 更改Logo diff --git a/doc/development/integrations.en-us.md b/development/integrations.en-us.md similarity index 96% rename from doc/development/integrations.en-us.md rename to development/integrations.en-us.md index bbb50ae7..66ea3624 100644 --- a/doc/development/integrations.en-us.md +++ b/development/integrations.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "Integrations" slug: "integrations" -weight: 65 +sidebar_position: 65 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "Integrations" - weight: 65 + sidebar_position: 65 identifier: "integrations" --- diff --git a/doc/development/integrations.zh-cn.md b/development/integrations.zh-cn.md similarity index 96% rename from doc/development/integrations.zh-cn.md rename to development/integrations.zh-cn.md index 694a9d56..0b8ca0d5 100644 --- a/doc/development/integrations.zh-cn.md +++ b/development/integrations.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T17:29:00+08:00" title: "集成" slug: "integrations" -weight: 65 +sidebar_position: 65 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "集成" - weight: 65 + sidebar_position: 65 identifier: "integrations" --- diff --git a/doc/development/integrations.zh-tw.md b/development/integrations.zh-tw.md similarity index 94% rename from doc/development/integrations.zh-tw.md rename to development/integrations.zh-tw.md index 278a8f41..9a6afad4 100644 --- a/doc/development/integrations.zh-tw.md +++ b/development/integrations.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "整合" slug: "integrations" -weight: 65 +sidebar_position: 65 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "整合" - weight: 65 + sidebar_position: 65 identifier: "integrations" --- diff --git a/doc/development/migrations.en-us.md b/development/migrations.en-us.md similarity index 97% rename from doc/development/migrations.en-us.md rename to development/migrations.en-us.md index f4116341..1e72f1b5 100644 --- a/doc/development/migrations.en-us.md +++ b/development/migrations.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "Migrations Interfaces" slug: "migrations-interfaces" -weight: 55 +sidebar_position: 55 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "Migrations Interfaces" - weight: 55 + sidebar_position: 55 identifier: "migrations-interfaces" --- diff --git a/doc/development/migrations.zh-cn.md b/development/migrations.zh-cn.md similarity index 97% rename from doc/development/migrations.zh-cn.md rename to development/migrations.zh-cn.md index 8e3d7341..923be904 100644 --- a/doc/development/migrations.zh-cn.md +++ b/development/migrations.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T17:29:00+08:00" title: "迁移界面" slug: "migrations-interfaces" -weight: 55 +sidebar_position: 55 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "迁移界面" - weight: 55 + sidebar_position: 55 identifier: "migrations-interfaces" --- diff --git a/doc/development/migrations.zh-tw.md b/development/migrations.zh-tw.md similarity index 97% rename from doc/development/migrations.zh-tw.md rename to development/migrations.zh-tw.md index c4171f3f..1dc222f3 100644 --- a/doc/development/migrations.zh-tw.md +++ b/development/migrations.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "遷移介面" slug: "migrations-interfaces" -weight: 55 +sidebar_position: 55 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "遷移介面" - weight: 55 + sidebar_position: 55 identifier: "migrations-interfaces" --- diff --git a/doc/development/oauth2-provider.en-us.md b/development/oauth2-provider.en-us.md similarity index 99% rename from doc/development/oauth2-provider.en-us.md rename to development/oauth2-provider.en-us.md index 03833b5a..11e995f0 100644 --- a/doc/development/oauth2-provider.en-us.md +++ b/development/oauth2-provider.en-us.md @@ -2,7 +2,7 @@ date: "2023-06-01T08:40:00+08:00" title: "OAuth2 provider" slug: "oauth2-provider" -weight: 41 +sidebar_position: 41 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "OAuth2 Provider" - weight: 41 + sidebar_position: 41 identifier: "oauth2-provider" --- # OAuth2 provider -**Table of Contents** - -{{< toc >}} - Gitea supports acting as an OAuth2 provider to allow third party applications to access its resources with the user's consent. This feature is available since release 1.8.0. ## Endpoints diff --git a/doc/development/oauth2-provider.zh-cn.md b/development/oauth2-provider.zh-cn.md similarity index 99% rename from doc/development/oauth2-provider.zh-cn.md rename to development/oauth2-provider.zh-cn.md index 3fbf174e..6584bac3 100644 --- a/doc/development/oauth2-provider.zh-cn.md +++ b/development/oauth2-provider.zh-cn.md @@ -2,7 +2,7 @@ date: "2019-04-19:44:00+01:00" title: "OAuth2 提供者" slug: "oauth2-provider" -weight: 41 +sidebar_position: 41 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "OAuth2 提供者" - weight: 41 + sidebar_position: 41 identifier: "oauth2-provider" --- # OAuth2 提供者 -**目录** - -{{< toc >}} - Gitea 支持作为 OAuth2 提供者,允许第三方应用程序在用户同意的情况下访问其资源。此功能自 1.8.0 版起可用。 ## 端点 diff --git a/doc/development/oauth2-provider.zh-tw.md b/development/oauth2-provider.zh-tw.md similarity index 98% rename from doc/development/oauth2-provider.zh-tw.md rename to development/oauth2-provider.zh-tw.md index 8d62264a..dac6e684 100644 --- a/doc/development/oauth2-provider.zh-tw.md +++ b/development/oauth2-provider.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-04-19:44:00+01:00" title: "OAuth2 提供者" slug: "oauth2-provider" -weight: 41 +sidebar_position: 41 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "OAuth2 提供者" - weight: 41 + sidebar_position: 41 identifier: "oauth2-provider" --- @@ -19,8 +19,6 @@ menu: **目錄** -{{< toc >}} - Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意下存取 Gitea 的資源。此功能自 1.8.0 版開始提供。 ## Endpoint diff --git a/doc/help.en-us.md b/help.en-us.md similarity index 76% rename from doc/help.en-us.md rename to help.en-us.md index 03c9a278..5a7f4a42 100644 --- a/doc/help.en-us.md +++ b/help.en-us.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "Help" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "Help" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/doc/help.fr-fr.md b/help.fr-fr.md similarity index 76% rename from doc/help.fr-fr.md rename to help.fr-fr.md index 42e01009..cb41ad64 100644 --- a/doc/help.fr-fr.md +++ b/help.fr-fr.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "Aide" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "Aide" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/doc/help.zh-cn.md b/help.zh-cn.md similarity index 77% rename from doc/help.zh-cn.md rename to help.zh-cn.md index e8c0bd26..60b63bc2 100644 --- a/doc/help.zh-cn.md +++ b/help.zh-cn.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "帮助" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "帮助" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/doc/help.zh-tw.md b/help.zh-tw.md similarity index 77% rename from doc/help.zh-tw.md rename to help.zh-tw.md index 270a4ed8..840ea100 100644 --- a/doc/help.zh-tw.md +++ b/help.zh-tw.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "幫助" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "幫助" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/doc/help/_index.en-us.md b/help/_index.en-us.md similarity index 100% rename from doc/help/_index.en-us.md rename to help/_index.en-us.md diff --git a/doc/help/_index.zh-cn.md b/help/_index.zh-cn.md similarity index 100% rename from doc/help/_index.zh-cn.md rename to help/_index.zh-cn.md diff --git a/doc/help/_index.zh-tw.md b/help/_index.zh-tw.md similarity index 100% rename from doc/help/_index.zh-tw.md rename to help/_index.zh-tw.md diff --git a/doc/help/faq.en-us.md b/help/faq.en-us.md similarity index 89% rename from doc/help/faq.en-us.md rename to help/faq.en-us.md index f67c5a05..01ff1703 100644 --- a/doc/help/faq.en-us.md +++ b/help/faq.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-05T16:00:00+02:00" title: "FAQ" slug: "faq" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "help" name: "FAQ" - weight: 5 + sidebar_position: 5 identifier: "faq" --- -# Frequently Asked Questions +# Frequently Asked Questions This page contains some common questions and answers. -For more help resources, check all [Support Options]({{< relref "doc/help/support.en-us.md" >}}). - -**Table of Contents** - -{{< toc >}} +For more help resources, check all [Support Options](help/support.md). ## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes? @@ -43,7 +39,7 @@ If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get t To migrate from Gogs to Gitea: -- [Gogs version 0.9.146 or less]({{< relref "doc/installation/upgrade-from-gogs.en-us.md" >}}) +- [Gogs version 0.9.146 or less](installation/upgrade-from-gogs.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. @@ -91,7 +87,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/administration/reverse-proxies.en-us.md" >}}) +1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide](administration/reverse-proxies.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` @@ -104,7 +100,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/administration/reverse-proxies.en-us.md" >}}) for a solution with nginx. +See the [reverse proxy guide](administration/reverse-proxies.md) for a solution with nginx. ## Custom Templates not loading or working incorrectly @@ -114,7 +110,7 @@ The correct path for the template(s) will be relative to the `CustomPath` 1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration 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/administration/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](administration/customizing-gitea.md) page to add your template to the correct location. ## Does Gitea have a "GitHub/GitLab pages" feature? @@ -132,7 +128,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/administration/logging-config.en-us.md" >}}) +- [Official Docs](administration/logging-config.md) ## What is Swagger? @@ -140,7 +136,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/development/api-usage.en-us.md" >}}). +For more information, refer to Gitea's [API docs](development/api-usage.md). You can see the latest API (for example) on . @@ -155,7 +151,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/administration/command-line.en-us.md" >}}), [API]({{< relref "doc/development/api-usage.en-us.md" >}}), or Gitea's Admin UI +4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI ### Only allow/block certain email domains @@ -181,7 +177,7 @@ At some point, a customer or third party needs access to a specific repo and onl ### Enable Fail2ban -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 +Use [Fail2Ban](administration/fail2ban-setup.md) to monitor and stop automated login attempts or other malicious behavior based on log patterns ## How to add/use custom themes @@ -334,24 +330,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/administration/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](administration/command-line.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/administration/email-setup.en-us.md" >}}) is configured, and disabled otherwise. +There is no setting for password resets. It is enabled when a [mail service](administration/email-setup.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/administration/command-line.en-us.md#admin" >}}). + - By using the [admin CLI commands](administration/command-line.md#admin). - 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. + Keep in mind most commands will also need a [global flag](administration/command-line.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/administration/email-setup.en-us.md" >}}). + If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service](administration/email-setup.md). ## Why is my markdown broken @@ -449,9 +445,9 @@ It is highly recommended to back-up your database before running these commands. - You can also check `/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 `/admin/repos/unadopted` and search. - - Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}). + - Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](administration/config-cheat-sheet.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/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors. + - If no repositories are found, enable [debug logging](administration/config-cheat-sheet.md#repository) to check for any specific errors. ## Gitea can't start on NFS diff --git a/doc/help/faq.zh-cn.md b/help/faq.zh-cn.md similarity index 88% rename from doc/help/faq.zh-cn.md rename to help/faq.zh-cn.md index 6a63b453..a11e074a 100644 --- a/doc/help/faq.zh-cn.md +++ b/help/faq.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T16:00:00+02:00" title: "常见问题" slug: "faq" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "help" name: "常见问题" - weight: 5 + sidebar_position: 5 identifier: "faq" --- -# 常见问题 +# 常见问题 本页面包含一些常见问题和答案。 -有关更多帮助资源,请查看所有[支持选项]({{< relref "doc/help/support.zh-cn.md" >}})。 - -**目录** - -{{< toc >}} +有关更多帮助资源,请查看所有[支持选项](help/support.md)。 ## 1.x和1.x.x下载之间的区别 @@ -45,7 +41,7 @@ menu: 要从Gogs迁移到Gitea: -- [Gogs版本0.9.146或更低]({{< relref "doc/installation/upgrade-from-gogs.zh-cn.md" >}}) +- [Gogs版本0.9.146或更低](installation/upgrade-from-gogs.md) - [Gogs版本0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286) 要从GitHub迁移到Gitea,您可以使用Gitea内置的迁移表单。 @@ -92,7 +88,7 @@ https://github.com/loganinak/MigrateGitlabToGogs 有几个地方可能会导致显示不正确。 -1. 如果使用反向代理,请确保按照[反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})中的正确说明进行设置。 +1. 如果使用反向代理,请确保按照[反向代理指南](administration/reverse-proxies.md)中的正确说明进行设置。 2. 确保在`app.ini`的`server`部分中正确设置了`ROOT_URL`。 如果某些克隆选项未显示(HTTP/S或SSH),可以在`app.ini中` @@ -105,7 +101,7 @@ https://github.com/loganinak/MigrateGitlabToGogs 当反向代理限制文件上传大小时,会出现此错误。 -有关使用nginx解决此问题,请参阅[反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})。 +有关使用nginx解决此问题,请参阅[反向代理指南](administration/reverse-proxies.md)。 ## 自定义模板无法加载或运行错误 @@ -117,8 +113,8 @@ Gitea的自定义模板必须将其添加到正确的位置,否则Gitea将无 如果找不到,请尝试`echo $GITEA_CUSTOM`。 -2. 如果仍然找不到,默认值可以被[计算]({{< relref "doc/help/faq.zh-cn.md#where-does-gitea-store-what-file" >}}) -3. 如果仍然找不到路径,则可以参考[自定义Gitea]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})页面,将模板添加到正确的位置。 +2. 如果仍然找不到,默认值可以被[计算](help/faq.md#where-does-gitea-store-what-file) +3. 如果仍然找不到路径,则可以参考[自定义Gitea](administration/customizing-gitea.md)页面,将模板添加到正确的位置。 ## Gitea是否有"GitHub/GitLab Pages"功能? @@ -136,7 +132,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 ## 设置日志记录 -- [官方文档]({{< relref "doc/administration/logging-config.zh-cn.md" >}}) +- [官方文档](administration/logging-config.md) ## 什么是Swagger? @@ -144,7 +140,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 所有Gitea实例都有内置的API,无法完全禁用它。 但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。 -有关更多信息,请参阅Gitea的[API文档]({{< relref "doc/development/api-usage.zh-cn.md" >}})。 +有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。 您可以在上查看最新的API(例如)。 @@ -159,7 +155,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 1. 通过设置电子邮件域名的白名单或黑名单。 2. 通过设置一些域名或者OpenID白名单(见下文)。 3. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。 -4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI]({{< relref "doc/administration/command-line.zh-cn.md" >}})、[API]({{< relref "doc/development/api-usage.zh-cn.md" >}}) 或 Gitea 的管理界面创建新用户。 +4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。 ### 仅允许/阻止特定的电子邮件域名 @@ -185,7 +181,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 ### 启用 Fail2ban -使用 [Fail2Ban]({{< relref "doc/administration/fail2ban-setup.zh-cn.md" >}}) 监视并阻止基于日志模式的自动登录尝试或其他恶意行为。 +使用 [Fail2Ban](administration/fail2ban-setup.md) 监视并阻止基于日志模式的自动登录尝试或其他恶意行为。 ## 如何添加/使用自定义主题 @@ -216,7 +212,7 @@ Gitea还提供了自己的SSH服务器,用于在SSHD不可用时使用。 请确保Gitea具有足够的权限来写入其主目录和数据目录。 -参见[AppDataPath 和 RepoRootPath]({{< relref "doc/help/faq.zh-cn.md#where-does-gitea-store-what-file" >}}) +参见[AppDataPath 和 RepoRootPath](help/faq.md#where-does-gitea-store-what-file) **适用于Arch用户的注意事项:**在撰写本文时,Arch软件包的systemd文件包含了以下行: @@ -338,24 +334,24 @@ error: failed to push some refs to '' ## 如何在启动 Gitea 之前创建用户 -Gitea 提供了一个子命令`gitea migrate`来初始化数据库,然后您可以使用[管理 CLI 命令]({{< relref "doc/administration/command-line.zh-cn.md#admin" >}})像正常情况下添加用户。 +Gitea 提供了一个子命令`gitea migrate`来初始化数据库,然后您可以使用[管理 CLI 命令](administration/command-line.md#admin)像正常情况下添加用户。 ## 如何启用密码重置 -没有密码重置的设置。当配置了[邮件服务]({{< relref "doc/administration/email-setup.zh-cn.md" >}})时,密码重置将自动启用;否则将被禁用。 +没有密码重置的设置。当配置了[邮件服务](administration/email-setup.md)时,密码重置将自动启用;否则将被禁用。 ## 如何更改用户的密码 - 作为管理员,您可以更改任何用户的密码(并可选择强制其在下次登录时更改密码)... - 转到您的`站点管理 -> 用户账户`页面并编辑用户。 -- 使用[管理 CLI 命令]({{< relref "doc/administration/command-line.zh-cn.md#admin" >}})。 +- 使用[管理 CLI 命令](administration/command-line.md#admin)。 - 请注意,大多数命令还需要一个[全局标志]({{< relref "doc/administration/command-line.zh-cn.- md#global-options" >}})来指向正确的配置。 + 请注意,大多数命令还需要一个[全局标志](administration/command-line.md#global-options)来指向正确的配置。 - 作为**用户**,您可以更改密码... - 在您的账户的`设置 -> 账户`页面(此方法**需要**您知道当前密码)。 - 使用`忘记密码`链接。 - 如果`忘记密码/账户恢复`页面被禁用,请联系管理员配置[邮件服务]({{< relref "doc/administration/email-setup.zh-cn.md" >}})。 + 如果`忘记密码/账户恢复`页面被禁用,请联系管理员配置[邮件服务](administration/email-setup.md)。 ## 为什么我的 Markdown 显示错误 @@ -410,7 +406,7 @@ SystemD 上的标准输出默认会写入日志记录中。您可以尝试使用 类似地,Docker 上的标准输出可以使用`docker logs `来查看。 -要收集日志以进行帮助和问题报告,请参阅[支持选项]({{< relref "doc/help/support.zh-cn.md" >}})。 +要收集日志以进行帮助和问题报告,请参阅[支持选项](help/support.md)。 ## 初始日志记录 @@ -467,6 +463,6 @@ gitea doctor recreate-table - 您还可以在`/admin/config`中检查存储库根路径。 - 确保存在要采用存储库的用户/组织。 - 作为管理员,转到`/admin/repos/unadopted`并搜索。 -- 用户也可以通过配置[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#repository" >}}) 获得类似的权限。 +- 用户也可以通过配置[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](administration/config-cheat-sheet.md#repository) 获得类似的权限。 - 如果上述步骤都正确执行,您应该能够选择要采用的存储库。 - - 如果没有找到存储库,请启用[调试日志记录]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#repository" >}})以检查是否有特定错误。 + - 如果没有找到存储库,请启用[调试日志记录](administration/config-cheat-sheet.md#repository)以检查是否有特定错误。 diff --git a/doc/help/support.en-us.md b/help/support.en-us.md similarity index 97% rename from doc/help/support.en-us.md rename to help/support.en-us.md index 2b285ce6..14407229 100644 --- a/doc/help/support.en-us.md +++ b/help/support.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-21T15:00:00+00:00" title: "Support Options" slug: "support" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "help" name: "Support Options" - weight: 20 + sidebar_position: 20 identifier: "support" --- diff --git a/doc/help/support.zh-cn.md b/help/support.zh-cn.md similarity index 93% rename from doc/help/support.zh-cn.md rename to help/support.zh-cn.md index 775dfe83..de56d8ab 100644 --- a/doc/help/support.zh-cn.md +++ b/help/support.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-01-20T15:00:00+08:00" title: "需要帮助" slug: "support" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "help" name: "需要帮助" - weight: 20 + sidebar_position: 20 identifier: "support" --- diff --git a/doc/help/support.zh-tw.md b/help/support.zh-tw.md similarity index 95% rename from doc/help/support.zh-tw.md rename to help/support.zh-tw.md index a9c35eaa..70f4db01 100644 --- a/doc/help/support.zh-tw.md +++ b/help/support.zh-tw.md @@ -2,7 +2,7 @@ date: "2018-05-21T15:00:00+00:00" title: "取得協助" slug: "support" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "help" name: "取得協助" - weight: 20 + sidebar_position: 20 identifier: "support" --- diff --git a/page/index.de-de.md b/index.de-de.md similarity index 96% rename from page/index.de-de.md rename to index.de-de.md index 3b344db1..7f0f611c 100644 --- a/page/index.de-de.md +++ b/index.de-de.md @@ -1,9 +1,8 @@ --- date: "2023-01-07T22:03:00+01:00" title: "Dokumentation" -slug: "documentation" -url: "/de-de/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/page/index.en-us.md b/index.en-us.md similarity index 99% rename from page/index.en-us.md rename to index.en-us.md index f986faf3..384710b4 100644 --- a/page/index.en-us.md +++ b/index.en-us.md @@ -1,9 +1,8 @@ --- date: "2016-11-08T16:00:00+02:00" title: "Documentation" -slug: "documentation" -url: "/en-us/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/page/index.fr-fr.md b/index.fr-fr.md similarity index 99% rename from page/index.fr-fr.md rename to index.fr-fr.md index 64dcdbc0..6d01cef1 100755 --- a/page/index.fr-fr.md +++ b/index.fr-fr.md @@ -1,9 +1,8 @@ --- date: "2017-08-23T09:00:00+02:00" title: "Documentation" -slug: "documentation" -url: "/fr-fr/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/page/index.zh-cn.md b/index.zh-cn.md similarity index 98% rename from page/index.zh-cn.md rename to index.zh-cn.md index ee214b63..c33bd9f9 100644 --- a/page/index.zh-cn.md +++ b/index.zh-cn.md @@ -1,9 +1,8 @@ --- date: "2016-11-08T16:00:00+02:00" title: "文档" -slug: "documentation" -url: "/zh-cn/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/page/index.zh-tw.md b/index.zh-tw.md similarity index 99% rename from page/index.zh-tw.md rename to index.zh-tw.md index 4f5558c6..3aa4fb7b 100644 --- a/page/index.zh-tw.md +++ b/index.zh-tw.md @@ -1,9 +1,8 @@ --- date: "2016-11-08T16:00:00+02:00" title: "文件" -slug: "documentation" -url: "/zh-tw/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/doc/installation.en-us.md b/installation.en-us.md similarity index 79% rename from doc/installation.en-us.md rename to installation.en-us.md index 4257521d..32933f0f 100644 --- a/doc/installation.en-us.md +++ b/installation.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "Installation" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/doc/installation.fr-fr.md b/installation.fr-fr.md similarity index 79% rename from doc/installation.fr-fr.md rename to installation.fr-fr.md index 55b48bda..1466e03e 100644 --- a/doc/installation.fr-fr.md +++ b/installation.fr-fr.md @@ -2,12 +2,12 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "Installation" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/doc/installation.zh-cn.md b/installation.zh-cn.md similarity index 78% rename from doc/installation.zh-cn.md rename to installation.zh-cn.md index 8f57e0f0..979abc28 100644 --- a/doc/installation.zh-cn.md +++ b/installation.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "安装" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "安装" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/doc/installation.zh-tw.md b/installation.zh-tw.md similarity index 78% rename from doc/installation.zh-tw.md rename to installation.zh-tw.md index f955e994..48b0983f 100644 --- a/doc/installation.zh-tw.md +++ b/installation.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "安裝" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "安裝" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/doc/installation/_index.en-us.md b/installation/_index.en-us.md similarity index 100% rename from doc/installation/_index.en-us.md rename to installation/_index.en-us.md diff --git a/doc/installation/_index.fr-fr.md b/installation/_index.fr-fr.md similarity index 100% rename from doc/installation/_index.fr-fr.md rename to installation/_index.fr-fr.md diff --git a/doc/installation/_index.zh-cn.md b/installation/_index.zh-cn.md similarity index 100% rename from doc/installation/_index.zh-cn.md rename to installation/_index.zh-cn.md diff --git a/doc/installation/_index.zh-tw.md b/installation/_index.zh-tw.md similarity index 100% rename from doc/installation/_index.zh-tw.md rename to installation/_index.zh-tw.md diff --git a/doc/installation/comparison.en-us.md b/installation/comparison.en-us.md similarity index 99% rename from doc/installation/comparison.en-us.md rename to installation/comparison.en-us.md index 578b00c2..80fa9b70 100644 --- a/doc/installation/comparison.en-us.md +++ b/installation/comparison.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-07T13:00:00+02:00" title: "Compared to other Git hosting" slug: "comparison" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -10,17 +10,13 @@ aliases: menu: sidebar: name: "Comparison" - weight: 5 + sidebar_position: 5 parent: installation identifier: "comparison" --- # Gitea compared to other Git hosting options -**Table of Contents** - -{{< toc >}} - To help decide if Gitea is suited for your needs, here is how it compares to other Git self hosted options. Be warned that we don't regularly check for feature changes in other products, so this list may be outdated. If you find anything that needs to be updated in the table below, please [open an issue](https://github.com/go-gitea/gitea/issues/new/choose). diff --git a/doc/installation/comparison.zh-cn.md b/installation/comparison.zh-cn.md similarity index 99% rename from doc/installation/comparison.zh-cn.md rename to installation/comparison.zh-cn.md index 91955ee6..acf3f4eb 100644 --- a/doc/installation/comparison.zh-cn.md +++ b/installation/comparison.zh-cn.md @@ -2,7 +2,7 @@ date: "2019-02-14T11:51:04+08:00" title: "对比 Gitea 与其它 Git 托管工具" slug: "comparison" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "横向对比" - weight: 5 + sidebar_position: 5 identifier: "comparison" --- diff --git a/doc/installation/comparison.zh-tw.md b/installation/comparison.zh-tw.md similarity index 99% rename from doc/installation/comparison.zh-tw.md rename to installation/comparison.zh-tw.md index 042acba8..01a1035d 100644 --- a/doc/installation/comparison.zh-tw.md +++ b/installation/comparison.zh-tw.md @@ -2,7 +2,7 @@ date: "2018-05-07T13:00:00+02:00" title: "比較 Gitea 和其它自託管 Git 服務" slug: "comparison" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "比較" - weight: 5 + sidebar_position: 5 identifier: "comparison" --- @@ -19,8 +19,6 @@ menu: **目錄** -{{< toc >}} - 為了幫助您判斷 Gitea 是否適合您的需求,這裡列出了它和其它自託管 Git 服務的比較。 請注意我們不會經常檢查其它產品的功能異動,所以這份清單可能過期,如果您在下方表格中找到需要更新的資料,請在 [GitHub 的 Issue](https://github.com/go-gitea/gitea/issues) 回報。 diff --git a/doc/installation/database-preparation.en-us.md b/installation/database-preparation.en-us.md similarity index 99% rename from doc/installation/database-preparation.en-us.md rename to installation/database-preparation.en-us.md index 4b0d1b5b..21360fa4 100644 --- a/doc/installation/database-preparation.en-us.md +++ b/installation/database-preparation.en-us.md @@ -2,7 +2,7 @@ date: "2020-01-16" title: "Database Preparation" slug: "database-prep" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Database preparation" - weight: 10 + sidebar_position: 10 identifier: "database-prep" --- @@ -23,10 +23,6 @@ Database instance can be on same machine as Gitea (local database setup), or on Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers. -**Table of Contents** - -{{< toc >}} - ## MySQL 1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to: diff --git a/doc/installation/database-preparation.zh-cn.md b/installation/database-preparation.zh-cn.md similarity index 99% rename from doc/installation/database-preparation.zh-cn.md rename to installation/database-preparation.zh-cn.md index 6c23f8ce..b5e8b73f 100644 --- a/doc/installation/database-preparation.zh-cn.md +++ b/installation/database-preparation.zh-cn.md @@ -2,7 +2,7 @@ date: "2020-01-16" title: "数据库准备" slug: "database-prep" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "数据库准备" - weight: 10 + sidebar_position: 10 identifier: "database-prep" --- @@ -23,10 +23,6 @@ menu: 注意:以下所有步骤要求您的选择的数据库引擎已安装在您的系统上。对于远程数据库设置,请在数据库实例上安装服务器应用程序,在 Gitea 服务器上安装客户端程序。客户端程序用于测试 Gitea 服务器与数据库之间的连接,而 Gitea 本身使用 Go 提供的数据库驱动程序完成相同的任务。此外,请确保服务器和客户端使用相同的引擎版本,以使某些引擎功能正常工作。出于安全原因,请使用安全密码保护 `root`(MySQL)或 `postgres`(PostgreSQL)数据库超级用户。以下步骤假设您在数据库和 Gitea 服务器上都使用 Linux。 -**目录** - -{{< toc >}} - ## MySQL 1. 对于远程数据库设置,您需要让 MySQL 监听您的 IP 地址。编辑数据库实例上的 `/etc/mysql/my.cnf` 文件中的 `bind-address` 选项为: diff --git a/doc/installation/from-binary.en-us.md b/installation/from-binary.en-us.md similarity index 90% rename from doc/installation/from-binary.en-us.md rename to installation/from-binary.en-us.md index 4c501aa3..88f82be3 100644 --- a/doc/installation/from-binary.en-us.md +++ b/installation/from-binary.en-us.md @@ -2,7 +2,7 @@ date: "2017-06-19T12:00:00+02:00" title: "Installation from binary" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "From binary" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -20,10 +20,6 @@ menu: All downloads come with SQLite, MySQL and PostgreSQL support, and are built with embedded assets. This can be different from Gogs. -**Table of Contents** - -{{< toc >}} - ## Download You can find the file matching your platform from the [downloads page](https://dl.gitea.com/gitea/) after navigating to the version you want to download. @@ -45,11 +41,11 @@ You can find the file matching your platform from the [downloads page](https://d Copy the commands below and replace the URL within the one you wish to download. ```sh -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` -Note that the above command will download Gitea {{< version >}} for 64-bit Linux. +Note that the above command will download Gitea @version@ for 64-bit Linux. ## Verify GPG signature @@ -58,7 +54,7 @@ To validate the binary, download the signature file which ends in `.asc` for the ```sh gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 -gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-amd64 +gpg --verify gitea-@version@-linux-amd64.asc gitea-@version@-linux-amd64 ``` Look for the text `Good signature from "Teabot "` to assert a good binary, @@ -66,7 +62,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/administration/environment-variables.en-us.md" >}}) as well! +**NOTE:** Many of the following directories can be configured using [Environment Variables](administration/environment-variables.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 @@ -127,7 +123,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/administration/command-line.en-us.md" >}}) for information on using `gitea generate secret`. +See the [command line documentation](administration/command-line.md) for information on using `gitea generate secret`. ### Configure Gitea's working directory @@ -159,7 +155,7 @@ After you complete the above steps, you can run Gitea two ways: ### 1. Creating a service file to start Gitea automatically (recommended) -See how to create [Linux service]({{< relref "doc/installation/run-as-service-in-ubuntu.en-us.md" >}}) +See how to create [Linux service](installation/run-as-service-in-ubuntu.md) ### 2. Running from command-line/terminal @@ -172,7 +168,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/administration/backup-and-restore.en-us.md" >}}) before updating your installation. +It is recommended that you make a [backup](administration/backup-and-restore.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. @@ -200,7 +196,7 @@ Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to loa Gitea binary, usually producing an error such as `./gitea: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC\_2.14' not found (required by ./gitea)`. This is due to the integrated SQLite support in the binaries provided by dl.gitea.com. In this situation, it is usually -possible to [install from source]({{< relref "doc/installation/from-source.en-us.md" >}}), without including +possible to [install from source](installation/from-source.md), without including SQLite support. ### Running Gitea on another port diff --git a/doc/installation/from-binary.fr-fr.md b/installation/from-binary.fr-fr.md similarity index 91% rename from doc/installation/from-binary.fr-fr.md rename to installation/from-binary.fr-fr.md index f3d31104..ac534263 100644 --- a/doc/installation/from-binary.fr-fr.md +++ b/installation/from-binary.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation avec le binaire pré-compilé" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Binaire pré-compilé" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -20,7 +20,7 @@ menu: Tous les binaires sont livrés avec le support de SQLite, MySQL et PostgreSQL, et sont construits avec les ressources incorporées. Gardez à l'esprit que cela peut être différent pour les versions antérieures. L'installation basée sur nos binaires est assez simple, il suffit de choisir le fichier correspondant à votre plateforme à partir de la [page de téléchargement](https://dl.gitea.com/gitea). Copiez l'URL et remplacer l'URL dans les commandes suivantes par la nouvelle: ``` -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` @@ -36,7 +36,7 @@ Après avoir suivi les étapes ci-dessus, vous aurez un binaire `gitea` dans vot ### Anciennes version de glibc -Les anciennes distributions Linux (comme Debian 7 ou CentOS 6) peuvent ne pas être capable d'exécuter le binaire Gitea, résultant généralement une erreur du type ```./gitea: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)```. Cette erreur est due au driver SQLite que nous intégrons dans le binaire Gitea. Dans le futur, nous fournirons des binaires sans la dépendance pour la bibliothèque glibc. En attendant, vous pouvez mettre à jour votre distribution ou installer Gitea depuis le [code source]({{< relref "doc/installation/from-source.fr-fr.md" >}}). +Les anciennes distributions Linux (comme Debian 7 ou CentOS 6) peuvent ne pas être capable d'exécuter le binaire Gitea, résultant généralement une erreur du type ```./gitea: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)```. Cette erreur est due au driver SQLite que nous intégrons dans le binaire Gitea. Dans le futur, nous fournirons des binaires sans la dépendance pour la bibliothèque glibc. En attendant, vous pouvez mettre à jour votre distribution ou installer Gitea depuis le [code source](installation/from-source.md). ### Exécuter Gitea avec un autre port diff --git a/doc/installation/from-binary.zh-cn.md b/installation/from-binary.zh-cn.md similarity index 89% rename from doc/installation/from-binary.zh-cn.md rename to installation/from-binary.zh-cn.md index 85fc4736..a5f54756 100644 --- a/doc/installation/from-binary.zh-cn.md +++ b/installation/from-binary.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用二进制文件安装" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用二进制文件安装" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -19,10 +19,6 @@ menu: 所有打包的二进制程序均包含 SQLite,MySQL 和 PostgreSQL 的数据库连接支持,同时网站的静态资源均已嵌入到可执行程序中,这一点和曾经的 Gogs 有所不同。 -**目录** - -{{< toc >}} - ## 下载 你可以从 [下载页面](https://dl.gitea.com/gitea/) 选择对应平台的二进制文件。 @@ -42,7 +38,7 @@ menu: 使用以下命令下载适用于 64-bit Linux 平台的二进制文件。 ```sh -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` @@ -53,7 +49,7 @@ Gitea 对打包的二进制文件使用 [GPG密钥](https://keys.openpgp.org/sea ```sh gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 -gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-amd64 +gpg --verify gitea-@version@-linux-amd64.asc gitea-@version@-linux-amd64 ``` 校验正确时的信息为 `Good signature from "Teabot "`。 @@ -61,7 +57,7 @@ gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-a ## 服务器设置 -**提示:** `GITEA_WORK_DIR` 表示 Gitea 工作的路径。以下路径可以通过 [环境变量]({{< relref "doc/administration/environment-variables.zh-cn.md" >}}) 初始化。 +**提示:** `GITEA_WORK_DIR` 表示 Gitea 工作的路径。以下路径可以通过 [环境变量](administration/environment-variables.md) 初始化。 ### 准备环境 @@ -143,7 +139,7 @@ cp gitea /usr/local/bin/gitea ### 1. 创建服务自动启动 Gitea(推荐) -学习创建 [Linux 服务]({{< relref "doc/installation/run-as-service-in-ubuntu.zh-cn.md" >}}) +学习创建 [Linux 服务](installation/run-as-service-in-ubuntu.md) ### 2. 通过命令行终端运行 @@ -155,7 +151,7 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini 您可以通过停止程序,替换 `/usr/local/bin/gitea` 并重启来更新到新版本。直接替换可执行程序时不要更改或使用新的文件名称,以避免数据出错。 -建议您在更新之前进行[备份]({{< relref "doc/administration/backup-and-restore.zh-cn.md" >}})。 +建议您在更新之前进行[备份](administration/backup-and-restore.md)。 ### 1. 使用 systemd 重新启动 Gitea(推荐) @@ -175,4 +171,4 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini > 更多经验总结,请参考英文版 [Troubleshooting](/en-us/install-from-binary/#troubleshooting) -如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "doc/help/support.zh-cn.md" >}}) +如果从本页中没有找到你需要的内容,请访问 [帮助页面](help/support.md) diff --git a/doc/installation/from-binary.zh-tw.md b/installation/from-binary.zh-tw.md similarity index 89% rename from doc/installation/from-binary.zh-tw.md rename to installation/from-binary.zh-tw.md index 78db7977..1fff90aa 100644 --- a/doc/installation/from-binary.zh-tw.md +++ b/installation/from-binary.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "執行檔安裝" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "執行檔" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -20,7 +20,7 @@ menu: 所有的執行檔皆支援 SQLite, MySQL and PostgreSQL,且所有檔案都已經包在執行檔內,這一點跟之前的版本有所不同。關於執行檔的安裝方式非常簡單,只要從[下載頁面](https://dl.gitea.com/gitea)選擇相對應平台,複製下載連結,使用底下指令就可以完成了: ``` -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` diff --git a/doc/installation/from-package.en-us.md b/installation/from-package.en-us.md similarity index 91% rename from doc/installation/from-package.en-us.md rename to installation/from-package.en-us.md index b427ae9a..36f3e2db 100644 --- a/doc/installation/from-package.en-us.md +++ b/installation/from-package.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation from package" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,20 +11,16 @@ menu: sidebar: parent: "installation" name: "From package" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- -**Table of Contents** - -{{< toc >}} - # Official packages ## macOS Currently, the only supported method of installation on MacOS is [Homebrew](http://brew.sh/). -Following the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide may work, +Following the [deployment from binary](installation/from-binary.md) guide may work, but is not supported. To install Gitea via `brew`: ``` @@ -87,7 +83,7 @@ There is a [Gitea](https://chocolatey.org/packages/gitea) package for Windows by choco install gitea ``` -Or follow the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide. +Or follow the [deployment from binary](installation/from-binary.md) guide. ## FreeBSD diff --git a/doc/installation/from-package.fr-fr.md b/installation/from-package.fr-fr.md similarity index 81% rename from doc/installation/from-package.fr-fr.md rename to installation/from-package.fr-fr.md index 0a00cd7f..256c913d 100644 --- a/doc/installation/from-package.fr-fr.md +++ b/installation/from-package.fr-fr.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation depuis le gestionnaire de paquets" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Gestionnaire de paquets" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- @@ -19,15 +19,15 @@ menu: ## Linux -Nous n'avons pas encore publié de paquet pour Linux, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets pour toutes distributions Linux. En attendant, vous devriez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. +Nous n'avons pas encore publié de paquet pour Linux, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets pour toutes distributions Linux. En attendant, vous devriez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. ## Windows -Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets sous la forme de fichiers `MSI` ou via [Chocolatey](https://chocolatey.org/). En attendant, vous devriez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. +Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets sous la forme de fichiers `MSI` ou via [Chocolatey](https://chocolatey.org/). En attendant, vous devriez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. ## macOS -Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes : +Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes : ``` brew tap go-gitea/gitea diff --git a/doc/installation/from-package.zh-cn.md b/installation/from-package.zh-cn.md similarity index 90% rename from doc/installation/from-package.zh-cn.md rename to installation/from-package.zh-cn.md index 4845dd11..702f2bd8 100644 --- a/doc/installation/from-package.zh-cn.md +++ b/installation/from-package.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用包管理器安装" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "installation" name: "使用包管理器安装" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- -**目录** - -{{< toc >}} - # 官方包管理器 ## macOS -macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令: +macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装](installation/from-binary.md)。在你安装了 `brew` 之后, 你可以执行以下命令: ``` brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea @@ -77,7 +73,7 @@ OpenSUSE 构建服务为 [openSUSE 和 SLE](https://software.opensuse.org/downlo choco install gitea ``` -你也可以 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}}) 。 +你也可以 [从二进制安装](installation/from-binary.md) 。 ## FreeBSD diff --git a/doc/installation/from-package.zh-tw.md b/installation/from-package.zh-tw.md similarity index 79% rename from doc/installation/from-package.zh-tw.md rename to installation/from-package.zh-tw.md index c01653e1..5a417ee2 100644 --- a/doc/installation/from-package.zh-tw.md +++ b/installation/from-package.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "套件安裝" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "套件安裝" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- @@ -19,7 +19,7 @@ menu: ## Linux -目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。 +目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝](installation/from-binary.md)方式。 ## Windows @@ -29,11 +29,11 @@ menu: choco install gitea ``` -也可以參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。 +也可以參考[執行檔安裝](installation/from-binary.md)方式。 ## macOS -目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令: +目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝](installation/from-binary.md)方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令: ``` brew tap go-gitea/gitea diff --git a/doc/installation/from-source.en-us.md b/installation/from-source.en-us.md similarity index 89% rename from doc/installation/from-source.en-us.md rename to installation/from-source.en-us.md index dfded3d9..9d5a9cae 100644 --- a/doc/installation/from-source.en-us.md +++ b/installation/from-source.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation from source" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "From source" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -25,7 +25,7 @@ environment variable and to add the go bin directory or directories Next, [install Node.js with npm](https://nodejs.org/en/download/) which is required to build the JavaScript and CSS files. The minimum supported Node.js -version is {{< min-node-version >}} and the latest LTS version is recommended. +version is @minNodeVersion@ and the latest LTS version is recommended. **Note**: When executing make tasks that require external tools, like `make misspell-check`, Gitea will automatically download and build these as @@ -33,13 +33,9 @@ necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory on the executable path. If you don't add the go bin directory to the 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 +**Note 2**: Go version @minGoVersion@ or higher is required. However, it is recommended to obtain the same version as our continuous integration, see the advice given in -[Hacking on Gitea]({{< relref "doc/development/hacking-on-gitea.en-us.md" >}}) - -**Table of Contents** - -{{< toc >}} +[Hacking on Gitea](development/hacking-on-gitea.md) ## Download @@ -62,7 +58,7 @@ To work with tagged releases, the following commands can be used: ```bash git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` To validate a Pull Request, first enable the new branch (`xyz` is the PR id; @@ -72,23 +68,23 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)): git fetch origin pull/xyz/head:pr-xyz ``` -To build Gitea from source at a specific tagged release (like v{{< version >}}), list the +To build Gitea from source at a specific tagged release (like v@version@), list the available tags and check out the specific tag. List available tags with the following. ```bash git tag -l -git checkout v{{< version >}} # or git checkout pr-xyz +git checkout v@version@ # or git checkout pr-xyz ``` ## Build 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/development/hacking-on-gitea.en-us.md" >}}#installing-make) +- `go` @minGoVersion@ or higher, see [here](https://golang.org/dl/) +- `node` @minNodeVersion@ or higher with `npm`, see [here](https://nodejs.org/en/download/) +- `make`, see [here](development/hacking-on-gitea.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. @@ -123,8 +119,8 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build The `build` target is split into two sub-targets: -- `make backend` which requires [Go {{< min-go-version >}}](https://golang.org/dl/) or greater. -- `make frontend` which requires [Node.js {{< min-node-version >}}](https://nodejs.org/en/download/) or greater. +- `make backend` which requires [Go @minGoVersion@](https://golang.org/dl/) or greater. +- `make frontend` which requires [Node.js @minNodeVersion@](https://nodejs.org/en/download/) or greater. If pre-built frontend files are present it is possible to only build the backend: diff --git a/doc/installation/from-source.fr-fr.md b/installation/from-source.fr-fr.md similarity index 93% rename from doc/installation/from-source.fr-fr.md rename to installation/from-source.fr-fr.md index 6e2ff164..fe0f173b 100644 --- a/doc/installation/from-source.fr-fr.md +++ b/installation/from-source.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation depuis le code source" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Code source" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -36,7 +36,7 @@ Si vous souhaitez compiler la dernière version stable, utilisez les étiquettes ``` git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activer cette branche en premier : @@ -45,11 +45,11 @@ Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activ git fetch origin pull/xyz/head:pr-xyz # xyz is PR value ``` -Enfin, vous pouvez directement utiliser les versions étiquettées (ex : `v{{< version >}}`). Pour utiliser les étiquettes, vous devez lister les étiquettes disponibles et choisir une étiquette spécifique avec les commandes suivantes : +Enfin, vous pouvez directement utiliser les versions étiquettées (ex : `v@version@`). Pour utiliser les étiquettes, vous devez lister les étiquettes disponibles et choisir une étiquette spécifique avec les commandes suivantes : ``` git tag -l -git checkout v{{< version >}} +git checkout v@version@ git checkout pr-xyz ``` diff --git a/doc/installation/from-source.zh-cn.md b/installation/from-source.zh-cn.md similarity index 86% rename from doc/installation/from-source.zh-cn.md rename to installation/from-source.zh-cn.md index d9f54ba3..40c04ace 100644 --- a/doc/installation/from-source.zh-cn.md +++ b/installation/from-source.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用源代码安装" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用源代码安装" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -21,10 +21,6 @@ menu: 其次你需要[安装Node.js](https://nodejs.org/zh-cn/download/),Node.js 和 npm 将用于构建 Gitea 前端。 -**目录** - -{{< toc >}} - ## 下载 你需要获取Gitea的源码,最方便的方式是使用 `git` 命令。执行以下命令: @@ -40,22 +36,22 @@ cd gitea ```bash git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` -最后,你也可以直接使用标签版本如 `v{{< version >}}`。你可以执行以下命令列出可用的版本并选择某个版本签出: +最后,你也可以直接使用标签版本如 `v@version@`。你可以执行以下命令列出可用的版本并选择某个版本签出: ```bash git tag -l -git checkout v{{< version >}} +git checkout v@version@ ``` ## 编译 要从源代码进行编译,以下依赖程序必须事先安装好: -- `go` {{< min-go-version >}} 或以上版本, 详见[这里](https://golang.google.cn/doc/install) -- `node` {{< min-node-version >}} 或以上版本,并且安装 `npm`, 详见[这里](https://nodejs.org/zh-cn/download/) +- `go` @minGoVersion@ 或以上版本, 详见[这里](https://golang.google.cn/doc/install) +- `node` @minNodeVersion@ 或以上版本,并且安装 `npm`, 详见[这里](https://nodejs.org/zh-cn/download/) - `make`, 详见[这里](/zh-cn/hacking-on-gitea/) 各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/main/Makefile) diff --git a/doc/installation/from-source.zh-tw.md b/installation/from-source.zh-tw.md similarity index 87% rename from doc/installation/from-source.zh-tw.md rename to installation/from-source.zh-tw.md index ea34b7e1..eedfc36f 100644 --- a/doc/installation/from-source.zh-tw.md +++ b/installation/from-source.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "原始碼安裝" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "原始碼安裝" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -34,14 +34,14 @@ cd $GOPATH/src/code.gitea.io/gitea ``` git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` -最後您也可以直接編譯最新的標籤版本像是 `v{{< version >}}`,假如您想要從原始碼編譯,這方法是最合適的,在編譯標籤版本前,您需要列出當下所有標籤,並且直接切換到標籤版本,請使用底下指令:: +最後您也可以直接編譯最新的標籤版本像是 `v@version@`,假如您想要從原始碼編譯,這方法是最合適的,在編譯標籤版本前,您需要列出當下所有標籤,並且直接切換到標籤版本,請使用底下指令:: ``` git tag -l -git checkout v{{< version >}} +git checkout v@version@ ``` ## 編譯 diff --git a/doc/installation/on-cloud-provider.en-us.md b/installation/on-cloud-provider.en-us.md similarity index 97% rename from doc/installation/on-cloud-provider.en-us.md rename to installation/on-cloud-provider.en-us.md index bf3bf4c3..d5baece8 100644 --- a/doc/installation/on-cloud-provider.en-us.md +++ b/installation/on-cloud-provider.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Install on Cloud Provider" slug: "install-on-cloud-provider" -weight: 90 +sidebar_position: 90 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "On cloud provider" - weight: 90 + sidebar_position: 90 identifier: "install-on-cloud-provider" --- # Installation on Cloud Provider -**Table of Contents** - -{{< toc >}} - ## Cloudron Gitea is available as a 1-click install on [Cloudron](https://cloudron.io). diff --git a/doc/installation/on-cloud-provider.zh-cn.md b/installation/on-cloud-provider.zh-cn.md similarity index 96% rename from doc/installation/on-cloud-provider.zh-cn.md rename to installation/on-cloud-provider.zh-cn.md index 80fbf2d5..7a2f3709 100644 --- a/doc/installation/on-cloud-provider.zh-cn.md +++ b/installation/on-cloud-provider.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "在云服务器中安装 Gitea" slug: "install-on-cloud-provider" -weight: 90 +sidebar_position: 90 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "在云服务器中安装 Gitea" - weight: 90 + sidebar_position: 90 identifier: "install-on-cloud-provider" --- # 在云服务器上安装 Gitea -**Table of Contents** - -{{< toc >}} - ## Cloudron Gitea 可以在 [Cloudron](https://cloudron.io) 上进行一键安装。 diff --git a/doc/installation/on-kubernetes.en-us.md b/installation/on-kubernetes.en-us.md similarity index 97% rename from doc/installation/on-kubernetes.en-us.md rename to installation/on-kubernetes.en-us.md index 0847a3b8..00f2aab2 100644 --- a/doc/installation/on-kubernetes.en-us.md +++ b/installation/on-kubernetes.en-us.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "Install on Kubernetes" slug: "install-on-kubernetes" -weight: 80 +sidebar_position: 80 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Kubernetes" - weight: 80 + sidebar_position: 80 identifier: "install-on-kubernetes" --- @@ -49,7 +49,6 @@ a successful health check response will respond with http code `200`, here's exa ``` HTTP/1.1 200 OK - { "status": "pass", "description": "Gitea: Git with a cup of tea", diff --git a/doc/installation/on-kubernetes.zh-cn.md b/installation/on-kubernetes.zh-cn.md similarity index 97% rename from doc/installation/on-kubernetes.zh-cn.md rename to installation/on-kubernetes.zh-cn.md index 83647a2e..1af55d87 100644 --- a/doc/installation/on-kubernetes.zh-cn.md +++ b/installation/on-kubernetes.zh-cn.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "在 Kubernetes 中安装 Gitea" slug: "install-on-kubernetes" -weight: 80 +sidebar_position: 80 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "在 Kubernetes 中安装 Gitea" - weight: 80 + sidebar_position: 80 identifier: "install-on-kubernetes" --- @@ -60,7 +60,6 @@ Gitea 附带了一个运行状况检查接口 `/api/healthz`,你可以像这 ``` HTTP/1.1 200 OK - { "status": "pass", "description": "Gitea: Git with a cup of tea", diff --git a/doc/installation/on-kubernetes.zh-tw.md b/installation/on-kubernetes.zh-tw.md similarity index 97% rename from doc/installation/on-kubernetes.zh-tw.md rename to installation/on-kubernetes.zh-tw.md index 28dfbda8..294e11ee 100644 --- a/doc/installation/on-kubernetes.zh-tw.md +++ b/installation/on-kubernetes.zh-tw.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "在 Kubernetes 安裝" slug: "install-on-kubernetes" -weight: 80 +sidebar_position: 80 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Kubernetes" - weight: 80 + sidebar_position: 80 identifier: "install-on-kubernetes" --- @@ -49,7 +49,6 @@ Gitea 附帶了一個運行狀況檢查端點 `/api/healthz`,你可以像這 ``` HTTP/1.1 200 OK - { "status": "pass", "description": "Gitea: Git with a cup of tea", diff --git a/doc/installation/run-as-service-in-ubuntu.en-us.md b/installation/run-as-service-in-ubuntu.en-us.md similarity index 97% rename from doc/installation/run-as-service-in-ubuntu.en-us.md rename to installation/run-as-service-in-ubuntu.en-us.md index 3587dfc0..ab862b37 100644 --- a/doc/installation/run-as-service-in-ubuntu.en-us.md +++ b/installation/run-as-service-in-ubuntu.en-us.md @@ -2,7 +2,7 @@ date: "2017-07-21T12:00:00+02:00" title: "Run as service in Linux" slug: "linux-service" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Linux service" - weight: 40 + sidebar_position: 40 identifier: "linux-service" --- diff --git a/doc/installation/run-as-service-in-ubuntu.zh-cn.md b/installation/run-as-service-in-ubuntu.zh-cn.md similarity index 97% rename from doc/installation/run-as-service-in-ubuntu.zh-cn.md rename to installation/run-as-service-in-ubuntu.zh-cn.md index 1512a4ab..6ec127c3 100644 --- a/doc/installation/run-as-service-in-ubuntu.zh-cn.md +++ b/installation/run-as-service-in-ubuntu.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-07-21T12:00:00+02:00" title: "在 Linux 中以 service 方式运行" slug: "linux-service" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "在Linux中以service方式运行" - weight: 40 + sidebar_position: 40 identifier: "linux-service" --- diff --git a/doc/installation/run-as-service-in-ubuntu.zh-tw.md b/installation/run-as-service-in-ubuntu.zh-tw.md similarity index 97% rename from doc/installation/run-as-service-in-ubuntu.zh-tw.md rename to installation/run-as-service-in-ubuntu.zh-tw.md index 7465f225..51b23dea 100644 --- a/doc/installation/run-as-service-in-ubuntu.zh-tw.md +++ b/installation/run-as-service-in-ubuntu.zh-tw.md @@ -2,7 +2,7 @@ date: "2017-07-21T12:00:00+02:00" title: "在 Linux 中以服務執行" slug: "linux-service" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Linux 服務" - weight: 40 + sidebar_position: 40 identifier: "linux-service" --- diff --git a/doc/installation/upgrade-from-gitea.en-us.md b/installation/upgrade-from-gitea.en-us.md similarity index 98% rename from doc/installation/upgrade-from-gitea.en-us.md rename to installation/upgrade-from-gitea.en-us.md index a6415f78..9b82de46 100644 --- a/doc/installation/upgrade-from-gitea.en-us.md +++ b/installation/upgrade-from-gitea.en-us.md @@ -2,7 +2,7 @@ date: "2021-09-02T16:00:00+08:00" title: "Upgrade from an old Gitea" slug: "upgrade-from-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "Upgrade From Old Gitea" - weight: 100 + sidebar_position: 100 identifier: "upgrade-from-gitea" --- # Upgrade from an old Gitea -**Table of Contents** - -{{< toc >}} - To update Gitea, download a newer version, stop the old one, perform a backup, and run the new one. Every time a Gitea instance starts up, it checks whether a database migration should be run. If a database migration is required, Gitea will take some time to complete the upgrade and then serve. diff --git a/doc/installation/upgrade-from-gitea.zh-cn.md b/installation/upgrade-from-gitea.zh-cn.md similarity index 98% rename from doc/installation/upgrade-from-gitea.zh-cn.md rename to installation/upgrade-from-gitea.zh-cn.md index 8429ca49..8c919e15 100644 --- a/doc/installation/upgrade-from-gitea.zh-cn.md +++ b/installation/upgrade-from-gitea.zh-cn.md @@ -2,23 +2,19 @@ date: "2021-09-02T16:00:00+08:00" title: "从旧版 Gitea 升级" slug: "upgrade-from-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false menu: sidebar: parent: "installation" name: "从旧版 Gitea 升级" - weight: 100 + sidebar_position: 100 identifier: "upgrade-from-gitea" --- # 从旧版 Gitea 升级 -**目录** - -{{< toc >}} - 想要升级 Gitea,只需要下载新版,停止运行旧版,进行数据备份,然后运行新版就好。 每次 Gitea 实例启动时,它都会检查是否要进行数据库迁移。 如果需要进行数据库迁移,Gitea 会花一些时间完成升级然后继续服务。 diff --git a/doc/installation/upgrade-from-gogs.en-us.md b/installation/upgrade-from-gogs.en-us.md similarity index 97% rename from doc/installation/upgrade-from-gogs.en-us.md rename to installation/upgrade-from-gogs.en-us.md index fa545ee0..47cddc1c 100644 --- a/doc/installation/upgrade-from-gogs.en-us.md +++ b/installation/upgrade-from-gogs.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Upgrade from Gogs" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "Upgrade From Gogs" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- # Upgrade from Gogs -**Table of Contents** - -{{< toc >}} - Gogs, version 0.9.146 and older, can be easily migrated to Gitea. There are some basic steps to follow. On a Linux system run as the Gogs user: @@ -83,7 +79,7 @@ Upgrade to [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/) first. Download th the destination platform from the [downloads page](https://dl.gitea.com/gitea/1.6.4/) and replace the binary. Run Gitea at least once and check that everything works as expected. -Then repeat the procedure, but this time using the [latest release](https://dl.gitea.com/gitea/{{< version >}}/). +Then repeat the procedure, but this time using the [latest release](https://dl.gitea.com/gitea/@version@/). ## Upgrading from a more recent version of Gogs diff --git a/doc/installation/upgrade-from-gogs.fr-fr.md b/installation/upgrade-from-gogs.fr-fr.md similarity index 98% rename from doc/installation/upgrade-from-gogs.fr-fr.md rename to installation/upgrade-from-gogs.fr-fr.md index 9d287d11..a5cd8759 100644 --- a/doc/installation/upgrade-from-gogs.fr-fr.md +++ b/installation/upgrade-from-gogs.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Mise à jour depuis Gogs" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Depuis Gogs" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- diff --git a/doc/installation/upgrade-from-gogs.zh-cn.md b/installation/upgrade-from-gogs.zh-cn.md similarity index 95% rename from doc/installation/upgrade-from-gogs.zh-cn.md rename to installation/upgrade-from-gogs.zh-cn.md index f537896c..4de41ca3 100644 --- a/doc/installation/upgrade-from-gogs.zh-cn.md +++ b/installation/upgrade-from-gogs.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "从 Gogs 升级" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "从 Gogs 升级" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- diff --git a/doc/installation/upgrade-from-gogs.zh-tw.md b/installation/upgrade-from-gogs.zh-tw.md similarity index 97% rename from doc/installation/upgrade-from-gogs.zh-tw.md rename to installation/upgrade-from-gogs.zh-tw.md index 46442845..ef5737bc 100644 --- a/doc/installation/upgrade-from-gogs.zh-tw.md +++ b/installation/upgrade-from-gogs.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "從 Gogs 升級" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "從 Gogs 升級" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- @@ -19,8 +19,6 @@ menu: **目錄** -{{< toc >}} - 若您正在執行 Gogs 0.9.146 以下版本,您可以很簡單地遷移到 Gitea。 請參考下列步驟。在 Linux 系統上請以 Gogs 的使用者身份執行: @@ -80,7 +78,7 @@ menu: 請先升級到 [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/),先從[下載頁](https://dl.gitea.com/gitea/1.6.4/)下載 您平臺的二進位檔取代既有的。至少執行一次 Gitea 並確認一切符合預期。 -接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.com/gitea/{{< version >}}/)。 +接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.com/gitea/@version@/)。 ## 從更新版本的 Gogs 升級 diff --git a/doc/installation/windows-service.en-us.md b/installation/windows-service.en-us.md similarity index 97% rename from doc/installation/windows-service.en-us.md rename to installation/windows-service.en-us.md index d3f5a9ab..201681bc 100644 --- a/doc/installation/windows-service.en-us.md +++ b/installation/windows-service.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-21T15:00:00-02:00" title: "Register as a Windows Service" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Windows Service" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/doc/installation/windows-service.fr-fr.md b/installation/windows-service.fr-fr.md similarity index 95% rename from doc/installation/windows-service.fr-fr.md rename to installation/windows-service.fr-fr.md index c4e00b04..d0d76062 100644 --- a/doc/installation/windows-service.fr-fr.md +++ b/installation/windows-service.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Démarrer en tant que service Windows" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Service Windows" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/doc/installation/windows-service.zh-cn.md b/installation/windows-service.zh-cn.md similarity index 95% rename from doc/installation/windows-service.zh-cn.md rename to installation/windows-service.zh-cn.md index 0f2a0f58..f2bff86f 100644 --- a/doc/installation/windows-service.zh-cn.md +++ b/installation/windows-service.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-21T15:00:00-02:00" title: "注册为Windows服务" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Windows服务" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/doc/installation/windows-service.zh-tw.md b/installation/windows-service.zh-tw.md similarity index 96% rename from doc/installation/windows-service.zh-tw.md rename to installation/windows-service.zh-tw.md index 5764d647..bd10b71d 100644 --- a/doc/installation/windows-service.zh-tw.md +++ b/installation/windows-service.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-21T15:00:00-02:00" title: "註冊為 Windows 服務" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Windows 服務" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/doc/installation/with-docker-rootless.en-us.md b/installation/with-docker-rootless.en-us.md similarity index 94% rename from doc/installation/with-docker-rootless.en-us.md rename to installation/with-docker-rootless.en-us.md index 6c2326b7..3c81c863 100644 --- a/doc/installation/with-docker-rootless.en-us.md +++ b/installation/with-docker-rootless.en-us.md @@ -2,7 +2,7 @@ date: "2020-02-09T20:00:00+02:00" title: "Installation with Docker (rootless)" slug: "install-with-docker-rootless" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "With Docker Rootless" - weight: 60 + sidebar_position: 60 identifier: "install-with-docker-rootless" --- @@ -47,7 +47,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -67,7 +67,7 @@ sudo chown 1000:1000 config/ data/ > If you don't give the volume correct permissions, the container may not start. -For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) +For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) ## Custom port @@ -80,7 +80,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -104,7 +104,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless + environment: + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=db:3306 @@ -145,7 +145,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless environment: + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 @@ -193,7 +193,7 @@ version: "2" + services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - - ./data:/var/lib/gitea @@ -220,7 +220,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always + user: 1001 volumes: @@ -282,7 +282,7 @@ docker-compose up -d - Rename folder (inside volume) gitea to custom - Edit app.ini if needed - Set START_SSH_SERVER = true -- Use image gitea/gitea:{{< version >}}-rootless +- Use image gitea/gitea:@version@-rootless ## Managing Deployments With Environment Variables diff --git a/doc/installation/with-docker-rootless.zh-cn.md b/installation/with-docker-rootless.zh-cn.md similarity index 94% rename from doc/installation/with-docker-rootless.zh-cn.md rename to installation/with-docker-rootless.zh-cn.md index eca2e438..1910e0a8 100644 --- a/doc/installation/with-docker-rootless.zh-cn.md +++ b/installation/with-docker-rootless.zh-cn.md @@ -2,7 +2,7 @@ date: "2020-02-09T20:00:00+02:00" title: "使用 Docker 安装 (rootless)" slug: "install-with-docker-rootless" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用 Docker 安装 (rootless)" - weight: 60 + sidebar_position: 60 identifier: "install-with-docker-rootless" --- @@ -42,7 +42,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -62,7 +62,7 @@ sudo chown 1000:1000 config/ data/ > 如果未为卷设置正确的权限,容器可能无法启动。 -对于稳定版本,您可以使用 `:latest-rootless`、`:1-rootless`,或指定特定的版本,如: `{{< version >}}-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。 +对于稳定版本,您可以使用 `:latest-rootless`、`:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。 ## 自定义端口 @@ -73,7 +73,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -96,7 +96,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless + environment: + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=db:3306 @@ -136,7 +136,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless environment: + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 @@ -181,7 +181,7 @@ version: "2" + services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - - ./data:/var/lib/gitea @@ -208,7 +208,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always + user: 1001 volumes: @@ -259,7 +259,7 @@ docker-compose up -d - 将卷中的文件夹(gitea)重命名为 custom - 如果需要,编辑 `app.ini` - 设置 `START_SSH_SERVER = true` -- 使用镜像 `gitea/gitea:{{< version >}}-rootless` +- 使用镜像 `gitea/gitea:@version@-rootless` ## 使用环境变量管理部署 diff --git a/doc/installation/with-docker.en-us.md b/installation/with-docker.en-us.md similarity index 98% rename from doc/installation/with-docker.en-us.md rename to installation/with-docker.en-us.md index 5f49876b..7b470460 100644 --- a/doc/installation/with-docker.en-us.md +++ b/installation/with-docker.en-us.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "Installation with Docker" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "With Docker" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- @@ -25,10 +25,6 @@ This reference setup guides users through the setup based on `docker-compose`, b of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow the official [install instructions](https://docs.docker.com/compose/install/). -**Table of Contents** - -{{< toc >}} - ## Basics The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest` @@ -36,7 +32,7 @@ image as a service. Since there is no database available, one can be initialized Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`. Note that the volume should be owned by the user/group with the UID/GID specified in the config file. If you don't give the volume correct permissions, the container may not start. -For a stable release you can use `:latest`, `:1` or specify a certain release like `:{{< version >}}`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) +For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) ```yaml version: "3" @@ -47,7 +43,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -79,7 +75,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -114,7 +110,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -165,7 +161,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -221,7 +217,7 @@ networks: + services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea restart: always networks: diff --git a/doc/installation/with-docker.fr-fr.md b/installation/with-docker.fr-fr.md similarity index 98% rename from doc/installation/with-docker.fr-fr.md rename to installation/with-docker.fr-fr.md index 362aa5fc..432add9a 100644 --- a/doc/installation/with-docker.fr-fr.md +++ b/installation/with-docker.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation avec Docker" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Docker" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- @@ -19,8 +19,6 @@ menu: Nous fournissons des images Docker mises à jour automatiquement via le Docker Hub de notre organisation. C'est à vous, lors devotre déploiement, de vous assurez d'utiliser toujours la dernière version stable ou d'utiliser un autre service qui met à jour l'image Docker pour vous. -{{< toc >}} - ## Données stockées sur l'hôte Tout d'abord, vous devez simplement récupérer l'image Docker avec la commande suivante : diff --git a/doc/installation/with-docker.zh-cn.md b/installation/with-docker.zh-cn.md similarity index 97% rename from doc/installation/with-docker.zh-cn.md rename to installation/with-docker.zh-cn.md index 50acc3ff..e04d3158 100644 --- a/doc/installation/with-docker.zh-cn.md +++ b/installation/with-docker.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用 Docker 安装" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用 Docker 安装" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- @@ -21,11 +21,9 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始 该参考设置指导用户完成基于 `docker-compose` 的设置,但是 `docker-compose` 的安装不在本文档的范围之内。要安装 `docker-compose` 本身,请遵循官方[安装说明](https://docs.docker.com/compose/install/)。 -{{< toc >}} - ## 基本 -最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `{{< version >}}`。 +最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`。 ```yaml version: "3" @@ -36,7 +34,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -66,7 +64,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -100,7 +98,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -150,7 +148,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -203,7 +201,7 @@ networks: + services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea restart: always networks: @@ -252,7 +250,7 @@ MySQL 或 PostgreSQL 容器将需要分别创建。 - `DB_HOST`:**localhost:3306**:数据库主机地址和端口。 - `DB_NAME`:**gitea**:数据库名称。 - `DB_USER`:**root**:数据库用户名。 -- `DB_PASSWD`:**"\"** :数据库用户密码。如果您在密码中使用特殊字符,请使用“您的密码”进行引用。 +- `DB_PASSWD`:**"_empty_"** :数据库用户密码。如果您在密码中使用特殊字符,请使用“您的密码”进行引用。 - `INSTALL_LOCK`:**false**:禁止访问安装页面。 - `SECRET_KEY`:**""** :全局密钥。这应该更改。如果它具有一个值并且 `INSTALL_LOCK` 为空,则 `INSTALL_LOCK` 将自动设置为 `true`。 - `DISABLE_REGISTRATION`:**false**:禁用注册,之后只有管理员才能为用户创建帐户。 diff --git a/doc/installation/with-docker.zh-tw.md b/installation/with-docker.zh-tw.md similarity index 96% rename from doc/installation/with-docker.zh-tw.md rename to installation/with-docker.zh-tw.md index fdf5a010..95f5cfff 100644 --- a/doc/installation/with-docker.zh-tw.md +++ b/installation/with-docker.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Docker 安裝" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,14 +11,12 @@ menu: sidebar: parent: "installation" name: "Docker 安裝" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- # 用 Docker 安裝 -{{< toc >}} - 我們在 Docker Hub 提供了自動更新的映像檔,它會保持最新穩定版。根據您的部屬環境來使用最新版本或用其他服務來更新 Docker 映像檔。首先您需要下載映像檔: ``` diff --git a/doc/packages.en-us.md b/packages.en-us.md similarity index 79% rename from doc/packages.en-us.md rename to packages.en-us.md index e4a87bde..75c29033 100644 --- a/doc/packages.en-us.md +++ b/packages.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "Packages" slug: "packages" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Usage - Packages" - weight: 30 + sidebar_position: 30 identifier: "packages" --- diff --git a/doc/search.de-de.md b/search.de-de.md similarity index 95% rename from doc/search.de-de.md rename to search.de-de.md index 29c15317..09a1ac22 100644 --- a/doc/search.de-de.md +++ b/search.de-de.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/search.en-us.md b/search.en-us.md similarity index 95% rename from doc/search.en-us.md rename to search.en-us.md index 60a4898c..226d9fe3 100644 --- a/doc/search.en-us.md +++ b/search.en-us.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/search.fr-fr.md b/search.fr-fr.md similarity index 95% rename from doc/search.fr-fr.md rename to search.fr-fr.md index d3f85c96..25510b7c 100644 --- a/doc/search.fr-fr.md +++ b/search.fr-fr.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Chercher" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/search.nl-nl.md b/search.nl-nl.md similarity index 95% rename from doc/search.nl-nl.md rename to search.nl-nl.md index 9ca7a34d..7ebcf28d 100644 --- a/doc/search.nl-nl.md +++ b/search.nl-nl.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/search.pt-br.md b/search.pt-br.md similarity index 95% rename from doc/search.pt-br.md rename to search.pt-br.md index 0a70026c..06b215c6 100644 --- a/doc/search.pt-br.md +++ b/search.pt-br.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/search.zh-cn.md b/search.zh-cn.md similarity index 95% rename from doc/search.zh-cn.md rename to search.zh-cn.md index 50415c25..6ab5ad08 100644 --- a/doc/search.zh-cn.md +++ b/search.zh-cn.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "搜索" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/search.zh-tw.md b/search.zh-tw.md similarity index 95% rename from doc/search.zh-tw.md rename to search.zh-tw.md index 746cb14c..aa8a1ced 100644 --- a/doc/search.zh-tw.md +++ b/search.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "搜尋" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/doc/usage.en-us.md b/usage.en-us.md similarity index 77% rename from doc/usage.en-us.md rename to usage.en-us.md index 47a4fdc1..436d031b 100644 --- a/doc/usage.en-us.md +++ b/usage.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "Usage" slug: "usage" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Usage" - weight: 30 + sidebar_position: 30 identifier: "usage" --- diff --git a/doc/usage.zh-cn.md b/usage.zh-cn.md similarity index 78% rename from doc/usage.zh-cn.md rename to usage.zh-cn.md index 026bef86..91e40ced 100644 --- a/doc/usage.zh-cn.md +++ b/usage.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "使用指南" slug: "usage" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "使用指南" - weight: 30 + sidebar_position: 30 identifier: "usage" --- diff --git a/doc/usage.zh-tw.md b/usage.zh-tw.md similarity index 77% rename from doc/usage.zh-tw.md rename to usage.zh-tw.md index a95e9739..795f95c7 100644 --- a/doc/usage.zh-tw.md +++ b/usage.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "使用" slug: "usage" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "使用" - weight: 30 + sidebar_position: 30 identifier: "usage" --- diff --git a/doc/usage/_index.en-us.md b/usage/_index.en-us.md similarity index 100% rename from doc/usage/_index.en-us.md rename to usage/_index.en-us.md diff --git a/doc/usage/_index.zh-cn.md b/usage/_index.zh-cn.md similarity index 100% rename from doc/usage/_index.zh-cn.md rename to usage/_index.zh-cn.md diff --git a/doc/usage/_index.zh-tw.md b/usage/_index.zh-tw.md similarity index 100% rename from doc/usage/_index.zh-tw.md rename to usage/_index.zh-tw.md diff --git a/doc/usage/actions/act-runner.en-us.md b/usage/actions/act-runner.en-us.md similarity index 99% rename from doc/usage/actions/act-runner.en-us.md rename to usage/actions/act-runner.en-us.md index ddab4353..e3946825 100644 --- a/doc/usage/actions/act-runner.en-us.md +++ b/usage/actions/act-runner.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Act Runner" slug: "act-runner" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "actions" name: "Act Runner" - weight: 20 + sidebar_position: 20 identifier: "actions-runner" --- @@ -17,10 +17,6 @@ menu: This page will introduce the [act runner](https://gitea.com/gitea/act_runner) in detail, which is the runner of Gitea Actions. -**Table of Contents** - -{{< toc >}} - ## Requirements It is recommended to run jobs in a docker container, so you need to install docker first. diff --git a/doc/usage/actions/act-runner.zh-cn.md b/usage/actions/act-runner.zh-cn.md similarity index 98% rename from doc/usage/actions/act-runner.zh-cn.md rename to usage/actions/act-runner.zh-cn.md index fb202e30..afe59507 100644 --- a/doc/usage/actions/act-runner.zh-cn.md +++ b/usage/actions/act-runner.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Act Runner" slug: "act-runner" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "actions" name: "Act Runner" - weight: 20 + sidebar_position: 20 identifier: "actions-runner" --- @@ -17,10 +17,6 @@ menu: 本页面将详细介绍[Act Runner](https://gitea.com/gitea/act_runner),这是Gitea Actions的Runner。 -**目录** - -{{< toc >}} - ## 要求 建议在Docker容器中运行Job,因此您需要首先安装Docker。 @@ -215,9 +211,9 @@ cache: enabled: true dir: "" # 使用步骤 1. 获取的 LAN IP -host: "192.168.8.17" +host: "192.168.8.17" # 使用步骤 2. 获取的端口号 -port: 8088 +port: 8088 ``` - 4.启动容器时, 将 Cache 端口映射至主机。 @@ -225,7 +221,7 @@ port: 8088 ```bash docker run \ --name gitea-docker-runner \ - -p 8088:8088 \ + -p 8088:8088 \ -d gitea/act_runner:nightly ``` diff --git a/doc/usage/actions/comparison.en-us.md b/usage/actions/comparison.en-us.md similarity index 97% rename from doc/usage/actions/comparison.en-us.md rename to usage/actions/comparison.en-us.md index 3ca25382..8ff883df 100644 --- a/doc/usage/actions/comparison.en-us.md +++ b/usage/actions/comparison.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Compared to GitHub Actions" slug: "comparison" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "actions" name: "Comparison" - weight: 30 + sidebar_position: 30 identifier: "actions-comparison" --- @@ -17,10 +17,6 @@ menu: Even though Gitea Actions is designed to be compatible with GitHub Actions, there are some differences between them. -**Table of Contents** - -{{< toc >}} - ## Additional features ### Absolute action URLs @@ -132,7 +128,7 @@ The missing host will be filled with `https://gitea.com` if you don't configure That means `uses: actions/checkout@v3` will download the action from [gitea.com/actions/checkout](https://gitea.com/actions/checkout), instead of [github.com/actions/checkout](https://github.com/actions/checkout). As mentioned, it's configurable. -If you want your runners to download actions from GitHub or your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`. See [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md#actions-actions" >}}). +If you want your runners to download actions from GitHub or your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`. See [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions). ### Context availability diff --git a/doc/usage/actions/comparison.zh-cn.md b/usage/actions/comparison.zh-cn.md similarity index 96% rename from doc/usage/actions/comparison.zh-cn.md rename to usage/actions/comparison.zh-cn.md index 8441368b..88f4306f 100644 --- a/doc/usage/actions/comparison.zh-cn.md +++ b/usage/actions/comparison.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "与GitHub Actions的对比" slug: "comparison" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "actions" name: "对比" - weight: 30 + sidebar_position: 30 identifier: "actions-comparison" --- @@ -17,10 +17,6 @@ menu: 尽管Gitea Actions旨在与GitHub Actions兼容,但它们之间存在一些差异。 -**目录** - -{{< toc >}} - ## 额外功能 ### Action URL绝对路径 @@ -132,7 +128,7 @@ Gitea Actions默认不从GitHub下载Actions。 这意味着`uses: actions/checkout@v3`将从[gitea.com/actions/checkout](https://gitea.com/actions/checkout)下载该Action,而不是[github.com/actions/checkout](https://github.com/actions/checkout)。 正如前面提到的,这是可配置的。 -如果您希望您的运行程序默认从GitHub或您自己的Gitea实例下载动作,您可以通过设置`[actions].DEFAULT_ACTIONS_URL`进行配置。请参阅[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#actions-actions" >}})。 +如果您希望您的运行程序默认从GitHub或您自己的Gitea实例下载动作,您可以通过设置`[actions].DEFAULT_ACTIONS_URL`进行配置。请参阅[配置备忘单](administration/config-cheat-sheet.md#actions-actions)。 ### 上下文可用性 diff --git a/doc/usage/actions/design.en-us.md b/usage/actions/design.en-us.md similarity index 99% rename from doc/usage/actions/design.en-us.md rename to usage/actions/design.en-us.md index c996185f..d4c90d54 100644 --- a/doc/usage/actions/design.en-us.md +++ b/usage/actions/design.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Design of Gitea Actions" slug: "design" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "actions" name: "Design" - weight: 40 + sidebar_position: 40 identifier: "actions-design" --- @@ -17,10 +17,6 @@ menu: Gitea Actions has multiple components. This document describes them individually. -**Table of Contents** - -{{< toc >}} - ## Act The [nektos/act](https://github.com/nektos/act) project is an excellent tool that allows you to run your GitHub Actions locally. diff --git a/doc/usage/actions/design.zh-cn.md b/usage/actions/design.zh-cn.md similarity index 99% rename from doc/usage/actions/design.zh-cn.md rename to usage/actions/design.zh-cn.md index e1bd1766..995e9f0b 100644 --- a/doc/usage/actions/design.zh-cn.md +++ b/usage/actions/design.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Gitea Actions设计" slug: "design" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "actions" name: "设计" - weight: 40 + sidebar_position: 40 identifier: "actions-design" --- @@ -17,10 +17,6 @@ menu: Gitea Actions由多个组件组成。本文档将对它们进行逐个描述。 -**目录** - -{{< toc >}} - ## Act [nektos/act](https://github.com/nektos/act) 项目是一个优秀的工具,允许你在本地运行GitHub Actions。 diff --git a/doc/usage/actions/faq.en-us.md b/usage/actions/faq.en-us.md similarity index 99% rename from doc/usage/actions/faq.en-us.md rename to usage/actions/faq.en-us.md index 69a4cf3e..d665b05b 100644 --- a/doc/usage/actions/faq.en-us.md +++ b/usage/actions/faq.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Frequently Asked Questions of Gitea Actions" slug: "faq" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "actions" name: "FAQ" - weight: 100 + sidebar_position: 100 identifier: "actions-faq" --- @@ -17,10 +17,6 @@ menu: This page contains some common questions and answers about Gitea Actions. -**Table of Contents** - -{{< toc >}} - ## Why is Actions not enabled by default? We know it's annoying to enable Actions for the whole instance and each repository one by one, but not everyone likes or needs this feature. diff --git a/doc/usage/actions/faq.zh-cn.md b/usage/actions/faq.zh-cn.md similarity index 99% rename from doc/usage/actions/faq.zh-cn.md rename to usage/actions/faq.zh-cn.md index ae6edd06..cdfea6d1 100644 --- a/doc/usage/actions/faq.zh-cn.md +++ b/usage/actions/faq.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Gitea Actions常见问题解答" slug: "faq" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "actions" name: "常见问题" - weight: 100 + sidebar_position: 100 identifier: "actions-faq" --- @@ -17,10 +17,6 @@ menu: 本页面包含一些关于Gitea Actions的常见问题和答案。 -**目录** - -{{< toc >}} - ## 为什么默认情况下不启用Actions? 我们知道为整个实例和每个仓库启用Actions可能很麻烦,但并不是每个人都喜欢或需要此功能。 diff --git a/doc/usage/actions/overview.en-us.md b/usage/actions/overview.en-us.md similarity index 97% rename from doc/usage/actions/overview.en-us.md rename to usage/actions/overview.en-us.md index e07eca99..59e539f9 100644 --- a/doc/usage/actions/overview.en-us.md +++ b/usage/actions/overview.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Gitea Actions" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "actions" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "actions-overview" --- @@ -17,10 +17,6 @@ menu: Starting with Gitea **1.19**, Gitea Actions are available as a built-in CI/CD solution. -**Table of Contents** - -{{< toc >}} - ## Name It is similar and compatible to [GitHub Actions](https://github.com/features/actions), and its name is inspired by it too. diff --git a/doc/usage/actions/overview.zh-cn.md b/usage/actions/overview.zh-cn.md similarity index 97% rename from doc/usage/actions/overview.zh-cn.md rename to usage/actions/overview.zh-cn.md index 20814481..0e57bf56 100644 --- a/doc/usage/actions/overview.zh-cn.md +++ b/usage/actions/overview.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Gitea Actions" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "actions" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "actions-overview" --- @@ -17,10 +17,6 @@ menu: 从Gitea **1.19**版本开始,Gitea Actions成为了内置的CI/CD解决方案。 -**目录** - -{{< toc >}} - ## 名称 Gitea Actions与[GitHub Actions](https://github.com/features/actions)相似且兼容,它的名称也受到了它的启发。 diff --git a/doc/usage/actions/quickstart.en-us.md b/usage/actions/quickstart.en-us.md similarity index 90% rename from doc/usage/actions/quickstart.en-us.md rename to usage/actions/quickstart.en-us.md index 132d11f1..dcc83118 100644 --- a/doc/usage/actions/quickstart.en-us.md +++ b/usage/actions/quickstart.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Quick Start" slug: "quickstart" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "actions" name: "Quick Start" - weight: 10 + sidebar_position: 10 identifier: "actions-quickstart" --- @@ -17,14 +17,10 @@ menu: This page will guide you through the process of using Gitea Actions. -**Table of Contents** - -{{< toc >}} - ## Set up Gitea First of all, you need a Gitea instance. -You can follow the [documentation]({{< relref "doc/installation/from-package.en-us.md" >}}) to set up a new instance or upgrade your existing one. +You can follow the [documentation](installation/from-package.md) to set up a new instance or upgrade your existing one. It doesn't matter how you install or run Gitea, as long as its version is 1.19.0 or higher. Actions are disabled by default, so you need to add the following to the configuration file to enable it: @@ -34,7 +30,7 @@ Actions are disabled by default, so you need to add the following to the configu ENABLED=true ``` -If you want to learn more or encounter any problems while configuring it, please refer to the [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md#actions-actions" >}}). +If you want to learn more or encounter any problems while configuring it, please refer to the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions). ### Set up runner @@ -85,7 +81,7 @@ And you can see the new runner in the management page: ![view runner](/images/usage/actions/view-runner.png) -You can find more information by visiting [Act runner]({{< relref "doc/usage/actions/act-runner.en-us.md" >}}). +You can find more information by visiting [Act runner](usage/actions/act-runner.md). ### Use Actions @@ -129,7 +125,7 @@ That is because Gitea Actions is designed to be compatible with GitHub Actions Be careful, the demo file contains some emojis. Please make sure your database supports them, especially when using MySQL. If the charset is not `utf8mb4`, errors will occur, such as `Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`. -See [Database Preparation]({{< relref "doc/installation/database-preparation.en-us.md#mysql" >}}) for more information. +See [Database Preparation](installation/database-preparation.md#mysql) for more information. Alternatively, you can remove all emojis from the demo file and try again. diff --git a/doc/usage/actions/quickstart.zh-cn.md b/usage/actions/quickstart.zh-cn.md similarity index 90% rename from doc/usage/actions/quickstart.zh-cn.md rename to usage/actions/quickstart.zh-cn.md index 7a06b6ed..564ee03c 100644 --- a/doc/usage/actions/quickstart.zh-cn.md +++ b/usage/actions/quickstart.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "快速入门" slug: "quickstart" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "actions" name: "快速入门" - weight: 10 + sidebar_position: 10 identifier: "actions-quickstart" --- @@ -17,14 +17,10 @@ menu: 本页面将指导您使用Gitea Actions的过程。 -**目录** - -{{< toc >}} - ## 设置Gitea 首先,您需要一个Gitea实例。 -您可以按照[文档]({{< relref "doc/installation/from-package.zh-cn.md" >}}) 来设置一个新实例或升级现有实例。 +您可以按照[文档](installation/from-package.md) 来设置一个新实例或升级现有实例。 无论您如何安装或运行Gitea,只要版本号是1.19.0或更高即可。 默认情况下,Actions是禁用的,因此您需要将以下内容添加到配置文件中以启用它: @@ -34,7 +30,7 @@ menu: ENABLED=true ``` -如果您想了解更多信息或在配置过程中遇到任何问题,请参考[配置速查表]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#actions-actions" >}})。 +如果您想了解更多信息或在配置过程中遇到任何问题,请参考[配置速查表](administration/config-cheat-sheet.md#actions-actions)。 ### 设置Runner @@ -84,7 +80,7 @@ Runner和Job容器(由Runner启动以执行Job)将连接到此地址。 ![view runner](/images/usage/actions/view-runner.png) -您可以通过访问[act runner]({{< relref "doc/usage/actions/act-runner.zh-cn.md" >}}) 获取更多信息。 +您可以通过访问[act runner](usage/actions/act-runner.md) 获取更多信息。 ### 使用Actions @@ -128,7 +124,7 @@ jobs: 请注意,演示文件中包含一些表情符号。 请确保您的数据库支持它们,特别是在使用MySQL时。 如果字符集不是`utf8mb4,将出现错误,例如`Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`。 -有关更多信息,请参阅[数据库准备工作]({{< relref "doc/installation/database-preparation.zh-cn.md#mysql" >}})。 +有关更多信息,请参阅[数据库准备工作](installation/database-preparation.md#mysql)。 或者,您可以从演示文件中删除所有表情符号,然后再尝试一次。 diff --git a/doc/usage/agit-support.en-us.md b/usage/agit-support.en-us.md similarity index 97% rename from doc/usage/agit-support.en-us.md rename to usage/agit-support.en-us.md index 30e2879e..25523efe 100644 --- a/doc/usage/agit-support.en-us.md +++ b/usage/agit-support.en-us.md @@ -2,7 +2,7 @@ date: " 2022-09-01T20:50:42+0000" title: "Agit Setup" slug: "agit-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Agit Setup" - weight: 12 + sidebar_position: 12 identifier: "agit-setup" --- diff --git a/doc/usage/agit-support.zh-cn.md b/usage/agit-support.zh-cn.md similarity index 96% rename from doc/usage/agit-support.zh-cn.md rename to usage/agit-support.zh-cn.md index de6eba24..6a2ce1c3 100644 --- a/doc/usage/agit-support.zh-cn.md +++ b/usage/agit-support.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Agit 设置" slug: "agit-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Agit 设置" - weight: 12 + sidebar_position: 12 identifier: "agit-setup" --- diff --git a/doc/usage/authentication.en-us.md b/usage/authentication.en-us.md similarity index 99% rename from doc/usage/authentication.en-us.md rename to usage/authentication.en-us.md index d9648200..d3664142 100644 --- a/doc/usage/authentication.en-us.md +++ b/usage/authentication.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Authentication" slug: "authentication" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,14 +11,12 @@ menu: sidebar: parent: "usage" name: "Authentication" - weight: 10 + sidebar_position: 10 identifier: "authentication" --- # Authentication -{{< toc >}} - ## LDAP (Lightweight Directory Access Protocol) Both the LDAP via BindDN and the simple auth LDAP share the following fields: diff --git a/doc/usage/authentication.zh-cn.md b/usage/authentication.zh-cn.md similarity index 97% rename from doc/usage/authentication.zh-cn.md rename to usage/authentication.zh-cn.md index 37ecc8ba..01b079b5 100644 --- a/doc/usage/authentication.zh-cn.md +++ b/usage/authentication.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "认证" slug: "authentication" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "认证" - weight: 10 + sidebar_position: 10 identifier: "authentication" --- diff --git a/doc/usage/authentication.zh-tw.md b/usage/authentication.zh-tw.md similarity index 84% rename from doc/usage/authentication.zh-tw.md rename to usage/authentication.zh-tw.md index 75959802..88dc3149 100644 --- a/doc/usage/authentication.zh-tw.md +++ b/usage/authentication.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "認證" slug: "authentication" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "認證" - weight: 10 + sidebar_position: 10 identifier: "authentication" --- diff --git a/doc/usage/clone-filter.en-us.md b/usage/clone-filter.en-us.md similarity index 96% rename from doc/usage/clone-filter.en-us.md rename to usage/clone-filter.en-us.md index 8331c138..c3d4a43e 100644 --- a/doc/usage/clone-filter.en-us.md +++ b/usage/clone-filter.en-us.md @@ -2,7 +2,7 @@ date: "2021-02-02" title: "Clone filters (partial clone)" slug: "clone-filters" -weight: 25 +sidebar_position: 25 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Clone filters" - weight: 25 + sidebar_position: 25 identifier: "clone-filters" --- diff --git a/doc/usage/clone-filter.zh-cn.md b/usage/clone-filter.zh-cn.md similarity index 97% rename from doc/usage/clone-filter.zh-cn.md rename to usage/clone-filter.zh-cn.md index fc174fcb..53ce060f 100644 --- a/doc/usage/clone-filter.zh-cn.md +++ b/usage/clone-filter.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "克隆过滤器 (部分克隆)" slug: "clone-filters" -weight: 25 +sidebar_position: 25 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "克隆过滤器" - weight: 25 + sidebar_position: 25 identifier: "clone-filters" --- diff --git a/doc/usage/incoming-email.en-us.md b/usage/incoming-email.en-us.md similarity index 96% rename from doc/usage/incoming-email.en-us.md rename to usage/incoming-email.en-us.md index 205b3dd8..3f20f3b1 100644 --- a/doc/usage/incoming-email.en-us.md +++ b/usage/incoming-email.en-us.md @@ -2,7 +2,7 @@ date: "2022-12-01T00:00:00+00:00" title: "Incoming Email" slug: "incoming-email" -weight: 13 +sidebar_position: 13 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Incoming Email" - weight: 13 + sidebar_position: 13 identifier: "incoming-email" --- @@ -19,10 +19,6 @@ menu: Gitea supports the execution of several actions through incoming mails. This page describes how to set this up. -**Table of Contents** - -{{< toc >}} - ## Requirements Handling incoming email messages requires an IMAP-enabled email account. diff --git a/doc/usage/incoming-email.zh-cn.md b/usage/incoming-email.zh-cn.md similarity index 97% rename from doc/usage/incoming-email.zh-cn.md rename to usage/incoming-email.zh-cn.md index 335e6aa9..7aeb3c08 100644 --- a/doc/usage/incoming-email.zh-cn.md +++ b/usage/incoming-email.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "邮件接收" slug: "incoming-email" -weight: 13 +sidebar_position: 13 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "邮件接收" - weight: 13 + sidebar_position: 13 identifier: "incoming-email" --- @@ -19,10 +19,6 @@ menu: Gitea 支持通过接收邮件执行多种操作。本页面描述了如何进行设置。 -**目录** - -{{< toc >}} - ## 要求 处理接收的电子邮件需要启用 IMAP 功能的电子邮件帐户。 diff --git a/doc/usage/issue-pull-request-templates.en-us.md b/usage/issue-pull-request-templates.en-us.md similarity index 99% rename from doc/usage/issue-pull-request-templates.en-us.md rename to usage/issue-pull-request-templates.en-us.md index b48763cf..34475e34 100644 --- a/doc/usage/issue-pull-request-templates.en-us.md +++ b/usage/issue-pull-request-templates.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-10T16:00:00+02:00" title: "Issue and Pull Request templates" slug: "issue-pull-request-templates" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Issue and Pull Request templates" - weight: 15 + sidebar_position: 15 identifier: "issue-pull-request-templates" --- # Issue and Pull Request Templates -**Table of Contents** - -{{< toc >}} - Some projects have a standard list of questions that users need to answer when creating an issue or pull request. Gitea supports adding templates to the main branch of the repository so that they can autopopulate the form when users are diff --git a/doc/usage/issue-pull-request-templates.zh-cn.md b/usage/issue-pull-request-templates.zh-cn.md similarity index 99% rename from doc/usage/issue-pull-request-templates.zh-cn.md rename to usage/issue-pull-request-templates.zh-cn.md index fa5b3712..fe865e33 100644 --- a/doc/usage/issue-pull-request-templates.zh-cn.md +++ b/usage/issue-pull-request-templates.zh-cn.md @@ -2,7 +2,7 @@ date: "2022-09-07T16:00:00+08:00" title: "工单与合并请求模板" slug: "issue-pull-request-templates" -weight: 15 +sidebar_position: 15 toc: true draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "工单与合并请求模板" - weight: 15 + sidebar_position: 15 identifier: "issue-pull-request-templates" --- @@ -19,10 +19,6 @@ menu: 开发者可以利用问题模板创建工单与合并请求,其目的在于规范参与者的语言表达。 -**目录** - -{{< toc >}} - ## 模板介绍 Gitea 支持两种格式的模板:Markdown 和 YAML。 diff --git a/doc/usage/labels.en-us.md b/usage/labels.en-us.md similarity index 97% rename from doc/usage/labels.en-us.md rename to usage/labels.en-us.md index 8467f7e0..4058ca14 100644 --- a/doc/usage/labels.en-us.md +++ b/usage/labels.en-us.md @@ -2,7 +2,7 @@ date: "2023-03-04T19:00:00+00:00" title: "Labels" slug: "labels" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Labels" - weight: 13 + sidebar_position: 13 identifier: "labels" --- diff --git a/doc/usage/labels.zh-cn.md b/usage/labels.zh-cn.md similarity index 97% rename from doc/usage/labels.zh-cn.md rename to usage/labels.zh-cn.md index 07dd2bf8..27c7d84f 100644 --- a/doc/usage/labels.zh-cn.md +++ b/usage/labels.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "标签" slug: "labels" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "标签" - weight: 13 + sidebar_position: 13 identifier: "labels" --- diff --git a/doc/usage/linked-references.en-us.md b/usage/linked-references.en-us.md similarity index 99% rename from doc/usage/linked-references.en-us.md rename to usage/linked-references.en-us.md index 4e951930..a05a07a9 100644 --- a/doc/usage/linked-references.en-us.md +++ b/usage/linked-references.en-us.md @@ -2,7 +2,7 @@ date: "2019-11-21T17:00:00-03:00" title: "Automatically Linked References" slug: "automatically-linked-references" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Automatically Linked References" - weight: 15 + sidebar_position: 15 identifier: "automatically-linked-references" --- # Automatically Linked References in Issues, Pull Requests and Commit Messages -**Table of Contents** - -{{< toc >}} - When an issue, pull request or comment is posted, the text description is parsed in search for references. These references will be shown as links in the Issue View and, in some cases, produce certain _actions_. diff --git a/doc/usage/linked-references.zh-cn.md b/usage/linked-references.zh-cn.md similarity index 99% rename from doc/usage/linked-references.zh-cn.md rename to usage/linked-references.zh-cn.md index e5658473..3cc8dca0 100644 --- a/doc/usage/linked-references.zh-cn.md +++ b/usage/linked-references.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "自动链接引用" slug: "automatically-linked-references" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "自动链接引用s" - weight: 15 + sidebar_position: 15 identifier: "automatically-linked-references" --- # 在工单、合并请求和提交消息中的自动链接引用 -**目录** - -{{< toc >}} - 当发布工单、合并请求或评论时,文本描述会被解析以查找引用。这些引用将显示为工单视图中的链接,并且在某些情况下会触发特定的“操作”。 类似地,当列出提交消息时,它们也会被解析,并且当它们被推送到主分支时可以触发“操作”。 diff --git a/doc/usage/merge-message-templates.en-us.md b/usage/merge-message-templates.en-us.md similarity index 96% rename from doc/usage/merge-message-templates.en-us.md rename to usage/merge-message-templates.en-us.md index 03095a3b..fbdbd136 100644 --- a/doc/usage/merge-message-templates.en-us.md +++ b/usage/merge-message-templates.en-us.md @@ -2,7 +2,7 @@ date: "2022-08-31T17:35:40+08:00" title: "Merge Message templates" slug: "merge-message-templates" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Merge Message templates" - weight: 15 + sidebar_position: 15 identifier: "merge-message-templates" --- # Merge Message templates -**Table of Contents** - -{{< toc >}} - ## File names Possible file names for PR default merge message templates: diff --git a/doc/usage/merge-message-templates.zh-cn.md b/usage/merge-message-templates.zh-cn.md similarity index 97% rename from doc/usage/merge-message-templates.zh-cn.md rename to usage/merge-message-templates.zh-cn.md index 0ec4eee4..0923e637 100644 --- a/doc/usage/merge-message-templates.zh-cn.md +++ b/usage/merge-message-templates.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "合并消息模板" slug: "merge-message-templates" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "合并消息模板" - weight: 15 + sidebar_position: 15 identifier: "merge-message-templates" --- # 合并消息模板 -**目录** - -{{< toc >}} - ## 文件名 PR 默认合并消息模板可能的文件名: diff --git a/doc/usage/packages/_index.en-us.md b/usage/packages/_index.en-us.md similarity index 100% rename from doc/usage/packages/_index.en-us.md rename to usage/packages/_index.en-us.md diff --git a/doc/usage/packages/alpine.en-us.md b/usage/packages/alpine.en-us.md similarity index 92% rename from doc/usage/packages/alpine.en-us.md rename to usage/packages/alpine.en-us.md index f7d2c665..1fcbe848 100644 --- a/doc/usage/packages/alpine.en-us.md +++ b/usage/packages/alpine.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Alpine" - weight: 4 + sidebar_position: 4 identifier: "alpine" --- @@ -16,10 +16,6 @@ menu: Publish [Alpine](https://pkgs.alpinelinux.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Alpine registry, you need to use a HTTP client like `curl` to upload and a package manager like `apk` to consume packages. @@ -40,7 +36,7 @@ https://gitea.example.com/api/packages/{owner}/alpine// | `branch` | The branch to use. | | `repository` | The repository to use. | -If the registry is private, provide credentials in the url. You can use a password or a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication): ``` https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/alpine// @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/alpine/v3.17/main ``` -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. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. You cannot publish a file with the same name twice to a package. You must delete the existing package file first. The server responds with the following HTTP Status codes. diff --git a/doc/usage/packages/alpine.zh-cn.md b/usage/packages/alpine.zh-cn.md similarity index 94% rename from doc/usage/packages/alpine.zh-cn.md rename to usage/packages/alpine.zh-cn.md index fd947052..cca002ca 100644 --- a/doc/usage/packages/alpine.zh-cn.md +++ b/usage/packages/alpine.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Alpine" - weight: 4 + sidebar_position: 4 identifier: "alpine" --- @@ -16,10 +16,6 @@ menu: 在您的用户或组织中发布 [Alpine](https://pkgs.alpinelinux.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Alpine 注册表,您需要使用像 curl 这样的 HTTP 客户端来上传包,并使用像 apk 这样的包管理器来消费包。 @@ -40,7 +36,7 @@ https://gitea.example.com/api/packages/{owner}/alpine// | `branch` | 要使用的分支名 | | `repository` | 要使用的仓库名 | -如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌](development/api-usage.md#通过-api-认证): ``` https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/alpine// @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/alpine/v3.17/main ``` -如果您使用的是双重身份验证或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#authentication" >}})代替密码。 +如果您使用的是双重身份验证或 OAuth,请使用[个人访问令牌](development/api-usage.md#authentication)代替密码。 您不能将具有相同名称的文件两次发布到一个包中。您必须首先删除现有的包文件。 服务器将以以下的 HTTP 状态码响应: diff --git a/doc/usage/packages/cargo.en-us.md b/usage/packages/cargo.en-us.md similarity index 94% rename from doc/usage/packages/cargo.en-us.md rename to usage/packages/cargo.en-us.md index d341eb9f..d5c2fab6 100644 --- a/doc/usage/packages/cargo.en-us.md +++ b/usage/packages/cargo.en-us.md @@ -2,14 +2,14 @@ date: "2022-11-20T00:00:00+00:00" title: "Cargo Package Registry" slug: "cargo" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Cargo" - weight: 5 + sidebar_position: 5 identifier: "cargo" --- @@ -17,10 +17,6 @@ menu: Publish [Cargo](https://doc.rust-lang.org/stable/cargo/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Cargo package registry, you need [Rust and Cargo](https://www.rust-lang.org/tools/install). @@ -74,7 +70,7 @@ token = "Bearer {token}" | Parameter | Description | | --------- | ----------- | -| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) | +| `token` | Your [personal access token](development/api-usage.md#authentication) | ## Publish a package diff --git a/doc/usage/packages/cargo.zh-cn.md b/usage/packages/cargo.zh-cn.md similarity index 94% rename from doc/usage/packages/cargo.zh-cn.md rename to usage/packages/cargo.zh-cn.md index 2d451716..126dfd37 100644 --- a/doc/usage/packages/cargo.zh-cn.md +++ b/usage/packages/cargo.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-11-20T00:00:00+00:00" title: "Cargo 软件包注册表" slug: "cargo" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Cargo" - weight: 5 + sidebar_position: 5 identifier: "cargo" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Cargo](https://doc.rust-lang.org/stable/cargo/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 若要使用 Cargo 软件包注册表, 您需要安装 [Rust 和 Cargo](https://www.rust-lang.org/tools/install). @@ -74,7 +70,7 @@ token = "Bearer {token}" | 参数 | 描述 | | ------- | ------------------------------------------------------------------------------------- | -| `token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}) | +| `token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证) | ## 发布软件包 diff --git a/doc/usage/packages/chef.en-us.md b/usage/packages/chef.en-us.md similarity index 97% rename from doc/usage/packages/chef.en-us.md rename to usage/packages/chef.en-us.md index ee779575..9f23b9ea 100644 --- a/doc/usage/packages/chef.en-us.md +++ b/usage/packages/chef.en-us.md @@ -2,14 +2,14 @@ date: "2023-01-20T00:00:00+00:00" title: "Chef Package Registry" slug: "chef" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Chef" - weight: 5 + sidebar_position: 5 identifier: "chef" --- @@ -17,10 +17,6 @@ menu: Publish [Chef](https://chef.io/) cookbooks for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Chef package registry, you have to use [`knife`](https://docs.chef.io/workstation/knife/). diff --git a/doc/usage/packages/chef.zh-cn.md b/usage/packages/chef.zh-cn.md similarity index 98% rename from doc/usage/packages/chef.zh-cn.md rename to usage/packages/chef.zh-cn.md index 939c94b4..d76b33c1 100644 --- a/doc/usage/packages/chef.zh-cn.md +++ b/usage/packages/chef.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-01-20T00:00:00+00:00" title: "Chef 软件包注册表" slug: "chef" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Chef" - weight: 5 + sidebar_position: 5 identifier: "chef" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Chef](https://chef.io/) cookbooks。 -**目录** - -{{< toc >}} - ## 要求 要使用 Chef 软件包注册表,您需要使用 [`knife`](https://docs.chef.io/workstation/knife/). diff --git a/doc/usage/packages/composer.en-us.md b/usage/packages/composer.en-us.md similarity index 93% rename from doc/usage/packages/composer.en-us.md rename to usage/packages/composer.en-us.md index 092518c9..7fbd77ef 100644 --- a/doc/usage/packages/composer.en-us.md +++ b/usage/packages/composer.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Composer Package Registry" slug: "composer" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "packages" name: "Composer" - weight: 10 + sidebar_position: 10 identifier: "composer" --- @@ -17,10 +17,6 @@ menu: Publish [Composer](https://getcomposer.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Composer package registry, you can use [Composer](https://getcomposer.org/download/) to consume and a HTTP upload client like `curl` to publish packages. @@ -61,7 +57,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/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. The server responds with the following HTTP Status codes. diff --git a/doc/usage/packages/composer.zh-cn.md b/usage/packages/composer.zh-cn.md similarity index 94% rename from doc/usage/packages/composer.zh-cn.md rename to usage/packages/composer.zh-cn.md index de19f713..c37e46b5 100644 --- a/doc/usage/packages/composer.zh-cn.md +++ b/usage/packages/composer.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Composer 软件包注册表" slug: "composer" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "packages" name: "Composer" - weight: 10 + sidebar_position: 10 identifier: "composer" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Composer](https://getcomposer.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Composer 软件包注册表,您可以使用 [Composer](https://getcomposer.org/download/) 消费,并使用类似 `curl` 的 HTTP 上传客户端发布软件包。 @@ -61,7 +57,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/composer?version=1.0.3 ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 服务器将以以下 HTTP 状态码响应。 diff --git a/doc/usage/packages/conan.en-us.md b/usage/packages/conan.en-us.md similarity index 91% rename from doc/usage/packages/conan.en-us.md rename to usage/packages/conan.en-us.md index 5ca3ca7a..24c7077a 100644 --- a/doc/usage/packages/conan.en-us.md +++ b/usage/packages/conan.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Conan Package Registry" slug: "conan" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "packages" name: "Conan" - weight: 20 + sidebar_position: 20 identifier: "conan" --- @@ -17,10 +17,6 @@ menu: Publish [Conan](https://conan.io/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Conan package registry, you need to use the [conan](https://conan.io/downloads.html) command line tool to consume and publish packages. @@ -38,7 +34,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/development/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](development/api-usage.md#authentication) instead of the password. | | `owner` | The owner of the package. | For example: diff --git a/doc/usage/packages/conan.zh-cn.md b/usage/packages/conan.zh-cn.md similarity index 93% rename from doc/usage/packages/conan.zh-cn.md rename to usage/packages/conan.zh-cn.md index 3d3aa8a2..48560025 100644 --- a/doc/usage/packages/conan.zh-cn.md +++ b/usage/packages/conan.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Conan 软件包注册表" slug: "conan" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "packages" name: "Conan" - weight: 20 + sidebar_position: 20 identifier: "conan" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Conan](https://conan.io/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 [conan](https://conan.io/downloads.html) 软件包注册表,您需要使用 conan 命令行工具来消费和发布软件包。 @@ -38,7 +34,7 @@ conan user --remote {remote} --password {password} {username} | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `remote` | 远程名称。 | | `username` | 您的 Gitea 用户名。 | -| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 | +| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 | | `owner` | 软件包的所有者。 | 例如: diff --git a/doc/usage/packages/conda.en-us.md b/usage/packages/conda.en-us.md similarity index 97% rename from doc/usage/packages/conda.en-us.md rename to usage/packages/conda.en-us.md index 6178b623..5b6f9767 100644 --- a/doc/usage/packages/conda.en-us.md +++ b/usage/packages/conda.en-us.md @@ -2,14 +2,14 @@ date: "2022-12-28T00:00:00+00:00" title: "Conda Package Registry" slug: "conda" -weight: 25 +sidebar_position: 25 draft: false toc: false menu: sidebar: parent: "packages" name: "Conda" - weight: 25 + sidebar_position: 25 identifier: "conda" --- @@ -17,10 +17,6 @@ menu: Publish [Conda](https://docs.conda.io/en/latest/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Conda package registry, you need to use [conda](https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html). diff --git a/doc/usage/packages/conda.zh-cn.md b/usage/packages/conda.zh-cn.md similarity index 98% rename from doc/usage/packages/conda.zh-cn.md rename to usage/packages/conda.zh-cn.md index 721c2761..6b385d25 100644 --- a/doc/usage/packages/conda.zh-cn.md +++ b/usage/packages/conda.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-12-28T00:00:00+00:00" title: "Conda 软件包注册表" slug: "conda" -weight: 25 +sidebar_position: 25 draft: false toc: false menu: sidebar: parent: "packages" name: "Conda" - weight: 25 + sidebar_position: 25 identifier: "conda" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Conda](https://docs.conda.io/en/latest/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Conda 软件包注册表,您需要使用 [conda](https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html) 命令行工具。 diff --git a/doc/usage/packages/container.en-us.md b/usage/packages/container.en-us.md similarity index 90% rename from doc/usage/packages/container.en-us.md rename to usage/packages/container.en-us.md index 457e6fb1..6be21c2b 100644 --- a/doc/usage/packages/container.en-us.md +++ b/usage/packages/container.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Container Registry" slug: "container" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "packages" name: "Container Registry" - weight: 30 + sidebar_position: 30 identifier: "container" --- @@ -18,10 +18,6 @@ menu: Publish [Open Container Initiative](https://opencontainers.org/) compliant images for your user or organization. The container registry follows the OCI specs and supports all compatible images like [Docker](https://www.docker.com/) and [Helm Charts](https://helm.sh/). -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Container registry, you can use the tools for your specific image type. @@ -35,7 +31,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/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. ## Image naming convention diff --git a/doc/usage/packages/container.zh-cn.md b/usage/packages/container.zh-cn.md similarity index 92% rename from doc/usage/packages/container.zh-cn.md rename to usage/packages/container.zh-cn.md index d441a810..28e4835a 100644 --- a/doc/usage/packages/container.zh-cn.md +++ b/usage/packages/container.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "容器注册表" slug: "container" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "packages" name: "容器" - weight: 30 + sidebar_position: 30 identifier: "container" --- @@ -18,10 +18,6 @@ menu: 为您的用户或组织发布符合 [Open Container Initiative(OCI)](https://opencontainers.org/) 规范的镜像。 该容器注册表遵循 OCI 规范,并支持所有兼容的镜像类型,如 [Docker](https://www.docker.com/) 和 [Helm Charts](https://helm.sh/)。 -**目录** - -{{< toc >}} - ## 目录 要使用容器注册表,您可以使用适用于特定镜像类型的工具。 @@ -35,7 +31,7 @@ menu: docker login gitea.example.com ``` -如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码进行身份验证。 +如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 ## 镜像命名约定 diff --git a/doc/usage/packages/cran.en-us.md b/usage/packages/cran.en-us.md similarity index 97% rename from doc/usage/packages/cran.en-us.md rename to usage/packages/cran.en-us.md index fafe4942..68de425d 100644 --- a/doc/usage/packages/cran.en-us.md +++ b/usage/packages/cran.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "CRAN" - weight: 35 + sidebar_position: 35 identifier: "cran" --- @@ -16,10 +16,6 @@ menu: Publish [R](https://www.r-project.org/) packages to a [CRAN](https://cran.r-project.org/)-like registry for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the CRAN package registry, you need to install [R](https://cran.r-project.org/). diff --git a/doc/usage/packages/cran.zh-cn.md b/usage/packages/cran.zh-cn.md similarity index 98% rename from doc/usage/packages/cran.zh-cn.md rename to usage/packages/cran.zh-cn.md index fec9a56f..c8e32a64 100644 --- a/doc/usage/packages/cran.zh-cn.md +++ b/usage/packages/cran.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "CRAN" - weight: 35 + sidebar_position: 35 identifier: "cran" --- @@ -16,10 +16,6 @@ menu: 将 [R](https://www.r-project.org/) 软件包发布到您的用户或组织的类似 [CRAN](https://cran.r-project.org/) 的注册表。 -**目录** - -{{< toc >}} - ## 要求 要使用CRAN软件包注册表,您需要安装 [R](https://cran.r-project.org/)。 diff --git a/doc/usage/packages/debian.en-us.md b/usage/packages/debian.en-us.md similarity index 92% rename from doc/usage/packages/debian.en-us.md rename to usage/packages/debian.en-us.md index 239fd8c1..6bd7475d 100644 --- a/doc/usage/packages/debian.en-us.md +++ b/usage/packages/debian.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Debian" - weight: 35 + sidebar_position: 35 identifier: "debian" --- @@ -16,10 +16,6 @@ menu: Publish [Debian](https://www.debian.org/distrib/packages) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Debian registry, you need to use a HTTP client like `curl` to upload and a package manager like `apt` to consume packages. @@ -40,7 +36,7 @@ echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} { | `distribution` | The distribution to use. | | `component` | The component to use. | -If the registry is private, provide credentials in the url. You can use a password or a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication): ```shell echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload ``` -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. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. You cannot publish a file with the same name twice to a package. You must delete the existing package version first. The server responds with the following HTTP Status codes. diff --git a/doc/usage/packages/debian.zh-cn.md b/usage/packages/debian.zh-cn.md similarity index 93% rename from doc/usage/packages/debian.zh-cn.md rename to usage/packages/debian.zh-cn.md index 57b8a9e4..417b79f7 100644 --- a/doc/usage/packages/debian.zh-cn.md +++ b/usage/packages/debian.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Debian" - weight: 35 + sidebar_position: 35 identifier: "debian" --- @@ -16,10 +16,6 @@ menu: 为您的用户或组织发布 [Debian](https://www.debian.org/distrib/packages) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Debian 注册表,您需要使用类似于 `curl` 的 HTTP 客户端进行上传,并使用类似于 `apt` 的软件包管理器消费软件包。 @@ -40,7 +36,7 @@ echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} { | `distribution` | 要使用的发行版 | | `component` | 要使用的组件 | -如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌](development/api-usage.md#通过-api-认证): ```shell echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 您无法向软件包中多次发布具有相同名称的文件。您必须首先删除现有的软件包版本。 服务器将使用以下 HTTP 状态代码进行响应。 diff --git a/doc/usage/packages/generic.en-us.md b/usage/packages/generic.en-us.md similarity index 93% rename from doc/usage/packages/generic.en-us.md rename to usage/packages/generic.en-us.md index 9ff89307..04be6e35 100644 --- a/doc/usage/packages/generic.en-us.md +++ b/usage/packages/generic.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Generic Package Registry" slug: "generic" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "packages" name: "Generic" - weight: 40 + sidebar_position: 40 identifier: "generic" --- @@ -17,13 +17,9 @@ menu: Publish generic files, like release binaries or other output, for your user or organization. -**Table of Contents** - -{{< toc >}} - ## 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/development/api-usage.en-us.md#authentication" >}}). +To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md#authentication). ## Publish a package @@ -49,7 +45,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/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. The server responds with the following HTTP Status codes. diff --git a/doc/usage/packages/generic.zh-cn.md b/usage/packages/generic.zh-cn.md similarity index 94% rename from doc/usage/packages/generic.zh-cn.md rename to usage/packages/generic.zh-cn.md index ce5cdcb7..f20f7ac4 100644 --- a/doc/usage/packages/generic.zh-cn.md +++ b/usage/packages/generic.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "通用软件包注册表" slug: "generic" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "packages" name: "通用" - weight: 40 + sidebar_position: 40 identifier: "generic" --- @@ -17,13 +17,9 @@ menu: 发布通用文件,如发布二进制文件或其他输出,供您的用户或组织使用。 -**目录** - -{{< toc >}} - ## 身份验证软件包注册表 -要身份验证软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 +要身份验证软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证](development/api-usage.md#通过-api-认证)。 ## 发布软件包 @@ -49,7 +45,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 服务器将使用以下 HTTP 状态代码进行响应。 diff --git a/doc/usage/packages/go.en-us.md b/usage/packages/go.en-us.md similarity index 86% rename from doc/usage/packages/go.en-us.md rename to usage/packages/go.en-us.md index 04452c35..7c406924 100644 --- a/doc/usage/packages/go.en-us.md +++ b/usage/packages/go.en-us.md @@ -2,14 +2,14 @@ date: "2023-05-10T00:00:00+00:00" title: "Go Package Registry" slug: "go" -weight: 45 +sidebar_position: 45 draft: false toc: false menu: sidebar: parent: "packages" name: "Go" - weight: 45 + sidebar_position: 45 identifier: "go" --- @@ -17,10 +17,6 @@ menu: Publish Go packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Publish a package To publish a Go package perform a HTTP `PUT` operation with the package content in the request body. @@ -35,7 +31,7 @@ PUT https://gitea.example.com/api/packages/{owner}/go/upload | --------- | ----------- | | `owner` | The owner of the package. | -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" >}}): +To authenticate to the package registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md#authentication): ```shell curl --user your_username:your_password_or_token \ @@ -43,7 +39,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/go/upload ``` -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. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. The server responds with the following HTTP Status codes. diff --git a/doc/usage/packages/go.zh-cn.md b/usage/packages/go.zh-cn.md similarity index 89% rename from doc/usage/packages/go.zh-cn.md rename to usage/packages/go.zh-cn.md index 069a6991..ddc7b837 100644 --- a/doc/usage/packages/go.zh-cn.md +++ b/usage/packages/go.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-10T00:00:00+00:00" title: "Go 软件包注册表" slug: "go" -weight: 45 +sidebar_position: 45 draft: false toc: false menu: sidebar: parent: "packages" name: "Go" - weight: 45 + sidebar_position: 45 identifier: "go" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 Go 软件包。 -**目录** - -{{< toc >}} - ## 发布软件包 要发布 Go 软件包,请执行 HTTP `PUT` 操作,并将软件包内容放入请求主体中。 @@ -35,7 +31,7 @@ PUT https://gitea.example.com/api/packages/{owner}/go/upload | ------- | -------------- | | `owner` | 软件包的所有者 | -要身份验证到软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +要身份验证到软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证](development/api-usage.md#通过-api-认证): ```shell curl --user your_username:your_password_or_token \ @@ -43,7 +39,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/go/upload ``` -如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码进行身份验证。 +如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 服务器将使用以下 HTTP 状态代码进行响应。 diff --git a/doc/usage/packages/helm.en-us.md b/usage/packages/helm.en-us.md similarity index 90% rename from doc/usage/packages/helm.en-us.md rename to usage/packages/helm.en-us.md index 1db1e875..a9fe6be8 100644 --- a/doc/usage/packages/helm.en-us.md +++ b/usage/packages/helm.en-us.md @@ -2,14 +2,14 @@ date: "2022-04-14T00:00:00+00:00" title: "Helm Chart Registry" slug: "helm" -weight: 50 +sidebar_position: 50 draft: false toc: false menu: sidebar: parent: "packages" name: "Helm" - weight: 50 + sidebar_position: 50 identifier: "helm" --- @@ -17,10 +17,6 @@ menu: Publish [Helm](https://helm.sh/) charts for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Helm Chart registry use a simple HTTP client like `curl` or the [`helm cm-push`](https://github.com/chartmuseum/helm-push/) plugin. @@ -43,7 +39,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/development/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](development/api-usage.md#authentication) instead of the password. | | `repo` | The name for the repository. | | `chart_file` | The Helm Chart archive. | | `owner` | The owner of the package. | diff --git a/doc/usage/packages/helm.zh-cn.md b/usage/packages/helm.zh-cn.md similarity index 93% rename from doc/usage/packages/helm.zh-cn.md rename to usage/packages/helm.zh-cn.md index 337170bc..ea9105e6 100644 --- a/doc/usage/packages/helm.zh-cn.md +++ b/usage/packages/helm.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-04-14T00:00:00+00:00" title: "Helm Chart 注册表" slug: "helm" -weight: 50 +sidebar_position: 50 draft: false toc: false menu: sidebar: parent: "packages" name: "Helm" - weight: 50 + sidebar_position: 50 identifier: "helm" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Helm](https://helm.sh/) charts。 -**目录** - -{{< toc >}} - ## 要求 要使用 Helm Chart 注册表,可以使用诸如 `curl` 或 [`helm cm-push`](https://github.com/chartmuseum/helm-push/) 插件之类的简单HTTP客户端。 @@ -43,7 +39,7 @@ helm cm-push ./{chart_file}.tgz {repo} | 参数 | 描述 | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | `username` | 您的Gitea用户名 | -| `password` | 您的Gitea密码。如果您使用的是2FA或OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码进行身份验证。 | +| `password` | 您的Gitea密码。如果您使用的是2FA或OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 | | `repo` | 仓库名称 | | `chart_file` | Helm Chart 归档文件 | | `owner` | 软件包的所有者 | diff --git a/doc/usage/packages/maven.en-us.md b/usage/packages/maven.en-us.md similarity index 95% rename from doc/usage/packages/maven.en-us.md rename to usage/packages/maven.en-us.md index 85b37fe4..59e71c87 100644 --- a/doc/usage/packages/maven.en-us.md +++ b/usage/packages/maven.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Maven Package Registry" slug: "maven" -weight: 60 +sidebar_position: 60 draft: false toc: false menu: sidebar: parent: "packages" name: "Maven" - weight: 60 + sidebar_position: 60 identifier: "maven" --- @@ -17,10 +17,6 @@ menu: Publish [Maven](https://maven.apache.org) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Maven package registry, you can use [Maven](https://maven.apache.org/install.html) or [Gradle](https://gradle.org/install/). @@ -71,7 +67,7 @@ Afterwards add the following sections to your project `pom.xml` file: | Parameter | Description | | -------------- | ----------- | -| `access_token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). | +| `access_token` | Your [personal access token](development/api-usage.md#authentication). | | `owner` | The owner of the package. | ### Gradle variant diff --git a/doc/usage/packages/maven.zh-cn.md b/usage/packages/maven.zh-cn.md similarity index 95% rename from doc/usage/packages/maven.zh-cn.md rename to usage/packages/maven.zh-cn.md index 833bb815..6b873c79 100644 --- a/doc/usage/packages/maven.zh-cn.md +++ b/usage/packages/maven.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Maven 软件包注册表" slug: "maven" -weight: 60 +sidebar_position: 60 draft: false toc: false menu: sidebar: parent: "packages" name: "Maven" - weight: 60 + sidebar_position: 60 identifier: "maven" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Maven](https://maven.apache.org) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Maven 软件包注册表,您可以使用 [Maven](https://maven.apache.org/install.html) 或 [Gradle](https://gradle.org/install/)。 @@ -71,7 +67,7 @@ menu: | 参数 | 描述 | | -------------- | ------------------------------------------------------------------------------------- | -| `access_token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}) | +| `access_token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证) | | `owner` | 软件包的所有者 | ### Gradle variant diff --git a/doc/usage/packages/npm.en-us.md b/usage/packages/npm.en-us.md similarity index 95% rename from doc/usage/packages/npm.en-us.md rename to usage/packages/npm.en-us.md index 58edcd02..1590b962 100644 --- a/doc/usage/packages/npm.en-us.md +++ b/usage/packages/npm.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "npm Package Registry" slug: "npm" -weight: 70 +sidebar_position: 70 draft: false toc: false menu: sidebar: parent: "packages" name: "npm" - weight: 70 + sidebar_position: 70 identifier: "npm" --- @@ -17,10 +17,6 @@ menu: Publish [npm](https://www.npmjs.com/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the npm package registry, you need [Node.js](https://nodejs.org/en/download/) coupled with a package manager such as [Yarn](https://classic.yarnpkg.com/en/docs/install) or [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/) itself. @@ -42,7 +38,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/development/api-usage.en-us.md#authentication" >}}). | +| `token` | Your [personal access token](development/api-usage.md#authentication). | For example: diff --git a/doc/usage/packages/npm.zh-cn.md b/usage/packages/npm.zh-cn.md similarity index 95% rename from doc/usage/packages/npm.zh-cn.md rename to usage/packages/npm.zh-cn.md index 4863b258..d51b8b78 100644 --- a/doc/usage/packages/npm.zh-cn.md +++ b/usage/packages/npm.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "npm 软件包注册表" slug: "npm" -weight: 70 +sidebar_position: 70 draft: false toc: false menu: sidebar: parent: "packages" name: "npm" - weight: 70 + sidebar_position: 70 identifier: "npm" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [npm](https://www.npmjs.com/) 包。 -**目录** - -{{< toc >}} - ## 要求 要使用 npm 包注册表,您需要安装 [Node.js](https://nodejs.org/en/download/) 以及与之配套的软件包管理器,例如 [Yarn](https://classic.yarnpkg.com/en/docs/install) 或 [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/) 本身。 @@ -42,7 +38,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t | ------- | --------------------------------------------------------------------------------------- | | `scope` | 软件包的作用域 | | `owner` | 软件包的所有者 | -| `token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 | +| `token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证)。 | 例如: diff --git a/doc/usage/packages/nuget.en-us.md b/usage/packages/nuget.en-us.md similarity index 91% rename from doc/usage/packages/nuget.en-us.md rename to usage/packages/nuget.en-us.md index ccda2cc4..8cd88e06 100644 --- a/doc/usage/packages/nuget.en-us.md +++ b/usage/packages/nuget.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "NuGet Package Registry" slug: "nuget" -weight: 80 +sidebar_position: 80 draft: false toc: false menu: sidebar: parent: "packages" name: "NuGet" - weight: 80 + sidebar_position: 80 identifier: "nuget" --- @@ -17,10 +17,6 @@ menu: Publish [NuGet](https://www.nuget.org/) packages for your user or organization. The package registry supports the V2 and V3 API protocol and you can work with [NuGet Symbol Packages](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg) too. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the NuGet package registry, you can use command-line interface tools as well as NuGet features in various IDEs like Visual Studio. @@ -39,7 +35,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/development/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](development/api-usage.md#authentication) instead of the password. | | `owner` | The owner of the package. | For example: @@ -48,7 +44,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/development/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](development/api-usage.md#authentication). ## Publish a package diff --git a/doc/usage/packages/nuget.zh-cn.md b/usage/packages/nuget.zh-cn.md similarity index 93% rename from doc/usage/packages/nuget.zh-cn.md rename to usage/packages/nuget.zh-cn.md index 14205545..692d5f92 100644 --- a/doc/usage/packages/nuget.zh-cn.md +++ b/usage/packages/nuget.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "NuGet 软件包注册表" slug: "nuget" -weight: 80 +sidebar_position: 80 draft: false toc: false menu: sidebar: parent: "packages" name: "NuGet" - weight: 80 + sidebar_position: 80 identifier: "nuget" --- @@ -17,10 +17,6 @@ menu: 发布适用于您的用户或组织的 [NuGet](https://www.nuget.org/) 软件包。软件包注册表支持 V2 和 V3 API 协议,并且您还可以使用 [NuGet 符号软件包](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg)。 -**目录** - -{{< toc >}} - ## 要求 要使用 NuGet 软件包注册表,您可以使用命令行界面工具,以及各种集成开发环境(IDE)中的 NuGet 功能,如 Visual Studio。有关 NuGet 客户端的更多信息,请参[阅官方文档](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools)。 @@ -38,7 +34,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `source_name` | 所需源名称 | | `username` | 您的Gitea用户名 | -| `password` | 您的Gitea密码。如果您使用2FA或OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})代替密码。 | +| `password` | 您的Gitea密码。如果您使用2FA或OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)代替密码。 | | `owner` | 软件包的所有者 | 例如: @@ -47,7 +43,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json ``` -您可以在不提供凭据的情况下添加源,并在发布软件包时使用--api-key参数。在这种情况下,您需要提供[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 +您可以在不提供凭据的情况下添加源,并在发布软件包时使用--api-key参数。在这种情况下,您需要提供[个人访问令牌](development/api-usage.md#通过-api-认证)。 ## 发布软件包 diff --git a/doc/usage/packages/overview.en-us.md b/usage/packages/overview.en-us.md similarity index 61% rename from doc/usage/packages/overview.en-us.md rename to usage/packages/overview.en-us.md index bf33ea62..44d18ff4 100644 --- a/doc/usage/packages/overview.en-us.md +++ b/usage/packages/overview.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Package Registry" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "packages" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "packages-overview" --- @@ -17,37 +17,33 @@ menu: Starting with Gitea **1.17**, the Package Registry can be used as a public or private registry for common package managers. -**Table of Contents** - -{{< toc >}} - ## Supported package managers The following package managers are currently supported: | Name | Language | Package client | | ---- | -------- | -------------- | -| [Alpine]({{< relref "doc/usage/packages/alpine.en-us.md" >}}) | - | `apk` | -| [Cargo]({{< relref "doc/usage/packages/cargo.en-us.md" >}}) | Rust | `cargo` | -| [Chef]({{< relref "doc/usage/packages/chef.en-us.md" >}}) | - | `knife` | -| [Composer]({{< relref "doc/usage/packages/composer.en-us.md" >}}) | PHP | `composer` | -| [Conan]({{< relref "doc/usage/packages/conan.en-us.md" >}}) | C++ | `conan` | -| [Conda]({{< relref "doc/usage/packages/conda.en-us.md" >}}) | - | `conda` | -| [Container]({{< relref "doc/usage/packages/container.en-us.md" >}}) | - | any OCI compliant client | -| [CRAN]({{< relref "doc/usage/packages/cran.en-us.md" >}}) | R | - | -| [Debian]({{< relref "doc/usage/packages/debian.en-us.md" >}}) | - | `apt` | -| [Generic]({{< relref "doc/usage/packages/generic.en-us.md" >}}) | - | any HTTP client | -| [Go]({{< relref "doc/usage/packages/go.en-us.md" >}}) | Go | `go` | -| [Helm]({{< relref "doc/usage/packages/helm.en-us.md" >}}) | - | any HTTP client, `cm-push` | -| [Maven]({{< relref "doc/usage/packages/maven.en-us.md" >}}) | Java | `mvn`, `gradle` | -| [npm]({{< relref "doc/usage/packages/npm.en-us.md" >}}) | JavaScript | `npm`, `yarn`, `pnpm` | -| [NuGet]({{< relref "doc/usage/packages/nuget.en-us.md" >}}) | .NET | `nuget` | -| [Pub]({{< relref "doc/usage/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` | -| [PyPI]({{< relref "doc/usage/packages/pypi.en-us.md" >}}) | Python | `pip`, `twine` | -| [RPM]({{< relref "doc/usage/packages/rpm.en-us.md" >}}) | - | `yum`, `dnf`, `zypper` | -| [RubyGems]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Ruby | `gem`, `Bundler` | -| [Swift]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Swift | `swift` | -| [Vagrant]({{< relref "doc/usage/packages/vagrant.en-us.md" >}}) | - | `vagrant` | +| [Alpine](usage/packages/alpine.md) | - | `apk` | +| [Cargo](usage/packages/cargo.md) | Rust | `cargo` | +| [Chef](usage/packages/chef.md) | - | `knife` | +| [Composer](usage/packages/composer.md) | PHP | `composer` | +| [Conan](usage/packages/conan.md) | C++ | `conan` | +| [Conda](usage/packages/conda.md) | - | `conda` | +| [Container](usage/packages/container.md) | - | any OCI compliant client | +| [CRAN](usage/packages/cran.md) | R | - | +| [Debian](usage/packages/debian.md) | - | `apt` | +| [Generic](usage/packages/generic.md) | - | any HTTP client | +| [Go](usage/packages/go.md) | Go | `go` | +| [Helm](usage/packages/helm.md) | - | any HTTP client, `cm-push` | +| [Maven](usage/packages/maven.md) | Java | `mvn`, `gradle` | +| [npm](usage/packages/npm.md) | JavaScript | `npm`, `yarn`, `pnpm` | +| [NuGet](usage/packages/nuget.md) | .NET | `nuget` | +| [Pub](usage/packages/pub.md) | Dart | `dart`, `flutter` | +| [PyPI](usage/packages/pypi.md) | Python | `pip`, `twine` | +| [RPM](usage/packages/rpm.md) | - | `yum`, `dnf`, `zypper` | +| [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` | +| [Swift](usage/packages/rubygems.md) | Swift | `swift` | +| [Vagrant](usage/packages/vagrant.md) | - | `vagrant` | **The following paragraphs only apply if Packages are not globally disabled!** diff --git a/doc/usage/packages/overview.zh-cn.md b/usage/packages/overview.zh-cn.md similarity index 56% rename from doc/usage/packages/overview.zh-cn.md rename to usage/packages/overview.zh-cn.md index 9d24a733..daacf1dc 100644 --- a/doc/usage/packages/overview.zh-cn.md +++ b/usage/packages/overview.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "软件包注册表" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "packages" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "packages-overview" --- @@ -17,37 +17,33 @@ menu: 从Gitea **1.17**版本开始,软件包注册表可以用作常见软件包管理器的公共或私有注册表。 -**目录** - -{{< toc >}} - ## 支持的软件包管理器 目前支持以下软件包管理器: | Name | Language | Package client | | ------------------------------------------------------------------- | ---------- | ------------------------- | -| [Alpine]({{< relref "doc/usage/packages/alpine.zh-cn.md" >}}) | - | `apk` | -| [Cargo]({{< relref "doc/usage/packages/cargo.zh-cn.md" >}}) | Rust | `cargo` | -| [Chef]({{< relref "doc/usage/packages/chef.zh-cn.md" >}}) | - | `knife` | -| [Composer]({{< relref "doc/usage/packages/composer.zh-cn.md" >}}) | PHP | `composer` | -| [Conan]({{< relref "doc/usage/packages/conan.zh-cn.md" >}}) | C++ | `conan` | -| [Conda]({{< relref "doc/usage/packages/conda.zh-cn.md" >}}) | - | `conda` | -| [Container]({{< relref "doc/usage/packages/container.zh-cn.md" >}}) | - | 任何符合OCI规范的客户端 | -| [CRAN]({{< relref "doc/usage/packages/cran.zh-cn.md" >}}) | R | - | -| [Debian]({{< relref "doc/usage/packages/debian.zh-cn.md" >}}) | - | `apt` | -| [Generic]({{< relref "doc/usage/packages/generic.zh-cn.md" >}}) | - | 任何HTTP客户端 | -| [Go]({{< relref "doc/usage/packages/go.zh-cn.md" >}}) | Go | `go` | -| [Helm]({{< relref "doc/usage/packages/helm.zh-cn.md" >}}) | - | 任何HTTP客户端, `cm-push` | -| [Maven]({{< relref "doc/usage/packages/maven.zh-cn.md" >}}) | Java | `mvn`, `gradle` | -| [npm]({{< relref "doc/usage/packages/npm.zh-cn.md" >}}) | JavaScript | `npm`, `yarn`, `pnpm` | -| [NuGet]({{< relref "doc/usage/packages/nuget.zh-cn.md" >}}) | .NET | `nuget` | -| [Pub]({{< relref "doc/usage/packages/pub.zh-cn.md" >}}) | Dart | `dart`, `flutter` | -| [PyPI]({{< relref "doc/usage/packages/pypi.zh-cn.md" >}}) | Python | `pip`, `twine` | -| [RPM]({{< relref "doc/usage/packages/rpm.zh-cn.md" >}}) | - | `yum`, `dnf`, `zypper` | -| [RubyGems]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Ruby | `gem`, `Bundler` | -| [Swift]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Swift | `swift` | -| [Vagrant]({{< relref "doc/usage/packages/vagrant.zh-cn.md" >}}) | - | `vagrant` | +| [Alpine](usage/packages/alpine.md) | - | `apk` | +| [Cargo](usage/packages/cargo.md) | Rust | `cargo` | +| [Chef](usage/packages/chef.md) | - | `knife` | +| [Composer](usage/packages/composer.md) | PHP | `composer` | +| [Conan](usage/packages/conan.md) | C++ | `conan` | +| [Conda](usage/packages/conda.md) | - | `conda` | +| [Container](usage/packages/container.md) | - | 任何符合OCI规范的客户端 | +| [CRAN](usage/packages/cran.md) | R | - | +| [Debian](usage/packages/debian.md) | - | `apt` | +| [Generic](usage/packages/generic.md) | - | 任何HTTP客户端 | +| [Go](usage/packages/go.md) | Go | `go` | +| [Helm](usage/packages/helm.md) | - | 任何HTTP客户端, `cm-push` | +| [Maven](usage/packages/maven.md) | Java | `mvn`, `gradle` | +| [npm](usage/packages/npm.md) | JavaScript | `npm`, `yarn`, `pnpm` | +| [NuGet](usage/packages/nuget.md) | .NET | `nuget` | +| [Pub](usage/packages/pub.md) | Dart | `dart`, `flutter` | +| [PyPI](usage/packages/pypi.md) | Python | `pip`, `twine` | +| [RPM](usage/packages/rpm.md) | - | `yum`, `dnf`, `zypper` | +| [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` | +| [Swift](usage/packages/rubygems.md) | Swift | `swift` | +| [Vagrant](usage/packages/vagrant.md) | - | `vagrant` | **以下段落仅适用于未全局禁用软件包的情况!** diff --git a/doc/usage/packages/pub.en-us.md b/usage/packages/pub.en-us.md similarity index 91% rename from doc/usage/packages/pub.en-us.md rename to usage/packages/pub.en-us.md index 823984d5..e5e12de3 100644 --- a/doc/usage/packages/pub.en-us.md +++ b/usage/packages/pub.en-us.md @@ -2,14 +2,14 @@ date: "2022-07-31T00:00:00+00:00" title: "Pub Package Registry" slug: "pub" -weight: 90 +sidebar_position: 90 draft: false toc: false menu: sidebar: parent: "packages" name: "Pub" - weight: 90 + sidebar_position: 90 identifier: "pub" --- @@ -17,10 +17,6 @@ menu: Publish [Pub](https://dart.dev/guides/packages) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Pub package registry, you need to use the tools [dart](https://dart.dev/tools/dart-tool) and/or [flutter](https://docs.flutter.dev/reference/flutter-cli). @@ -39,7 +35,7 @@ dart pub token add https://gitea.example.com/api/packages/{owner}/pub | ------------ | ----------- | | `owner` | The owner of the package. | -You need to provide your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). +You need to provide your [personal access token](development/api-usage.md#authentication). ## Publish a package diff --git a/doc/usage/packages/pub.zh-cn.md b/usage/packages/pub.zh-cn.md similarity index 91% rename from doc/usage/packages/pub.zh-cn.md rename to usage/packages/pub.zh-cn.md index 9941a570..2b3c3020 100644 --- a/doc/usage/packages/pub.zh-cn.md +++ b/usage/packages/pub.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-07-31T00:00:00+00:00" title: "Pub 软件包注册表" slug: "pub" -weight: 90 +sidebar_position: 90 draft: false toc: false menu: sidebar: parent: "packages" name: "Pub" - weight: 90 + sidebar_position: 90 identifier: "pub" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Pub](https://dart.dev/guides/packages) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用Pub软件包注册表,您需要使用 [dart](https://dart.dev/tools/dart-tool) 和/或 [flutter](https://docs.flutter.dev/reference/flutter-cli). 工具。 @@ -39,7 +35,7 @@ dart pub token add https://gitea.example.com/api/packages/{owner}/pub | ------- | -------------- | | `owner` | 软件包的所有者 | -您需要提供您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 +您需要提供您的[个人访问令牌](development/api-usage.md#通过-api-认证)。 ## 发布软件包 diff --git a/doc/usage/packages/pypi.en-us.md b/usage/packages/pypi.en-us.md similarity index 92% rename from doc/usage/packages/pypi.en-us.md rename to usage/packages/pypi.en-us.md index 822e3ab9..be59df07 100644 --- a/doc/usage/packages/pypi.en-us.md +++ b/usage/packages/pypi.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "PyPI Package Registry" slug: "pypi" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "packages" name: "PyPI" - weight: 100 + sidebar_position: 100 identifier: "pypi" --- @@ -17,10 +17,6 @@ menu: Publish [PyPI](https://pypi.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the PyPI package registry, you need to use the tools [pip](https://pypi.org/project/pip/) to consume and [twine](https://pypi.org/project/twine/) to publish packages. @@ -43,7 +39,7 @@ password = {password} | ------------ | ----------- | | `owner` | The owner of the package. | | `username` | Your Gitea username. | -| `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. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | ## Publish a package diff --git a/doc/usage/packages/pypi.zh-cn.md b/usage/packages/pypi.zh-cn.md similarity index 94% rename from doc/usage/packages/pypi.zh-cn.md rename to usage/packages/pypi.zh-cn.md index 555fc4db..80f95141 100644 --- a/doc/usage/packages/pypi.zh-cn.md +++ b/usage/packages/pypi.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "PyPI 软件包注册表" slug: "pypi" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "packages" name: "PyPI" - weight: 100 + sidebar_position: 100 identifier: "pypi" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [PyPI](https://pypi.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 PyPI 软件包注册表,您需要使用 [pip](https://pypi.org/project/pip/) 工具来消费和使用 [twine](https://pypi.org/project/twine/) 工具来发布软件包。 @@ -43,7 +39,7 @@ password = {password} | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `owner` | 软件包的所有者 | | `username` | 您的 Gitea 用户名 | -| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码 | +| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码 | ## 发布软件包 diff --git a/doc/usage/packages/rpm.en-us.md b/usage/packages/rpm.en-us.md similarity index 90% rename from doc/usage/packages/rpm.en-us.md rename to usage/packages/rpm.en-us.md index 7a258f5c..5a4a31ee 100644 --- a/doc/usage/packages/rpm.en-us.md +++ b/usage/packages/rpm.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "RPM" - weight: 105 + sidebar_position: 105 identifier: "rpm" --- @@ -16,10 +16,6 @@ menu: Publish [RPM](https://rpm.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the RPM registry, you need to use a package manager like `yum`, `dnf` or `zypper` to consume packages. @@ -38,7 +34,7 @@ dnf config-manager --add-repo https://gitea.example.com/api/packages/{owner}/rpm | ----------- | ----------- | | `owner` | The owner of the package. | -If the registry is private, provide credentials in the url. You can use a password or a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication): ```shell dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm.repo @@ -66,7 +62,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/rpm/upload ``` -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. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. You cannot publish a file with the same name twice to a package. You must delete the existing package version first. The server responds with the following HTTP Status codes. diff --git a/doc/usage/packages/rpm.zh-cn.md b/usage/packages/rpm.zh-cn.md similarity index 88% rename from doc/usage/packages/rpm.zh-cn.md rename to usage/packages/rpm.zh-cn.md index f76273e5..3cc7dca8 100644 --- a/doc/usage/packages/rpm.zh-cn.md +++ b/usage/packages/rpm.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "RPM" - weight: 105 + sidebar_position: 105 identifier: "rpm" --- @@ -16,10 +16,6 @@ menu: 为您的用户或组织发布 [RPM](https://rpm.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用RPM注册表,您需要使用像 `yum`, `dnf` 或 `zypper` 这样的软件包管理器来消费软件包。 @@ -38,7 +34,7 @@ dnf config-manager --add-repo https://gitea.example.com/api/packages/{owner}/rpm | ------- | -------------- | | `owner` | 软件包的所有者 | -如果注册表是私有的,请在URL中提供凭据。您可以使用密码或[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +如果注册表是私有的,请在URL中提供凭据。您可以使用密码或[个人访问令牌](development/api-usage.md#通过-api-认证): ```shell dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm.repo @@ -66,7 +62,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/rpm/upload ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。您无法将具有相同名称的文件两次发布到软件包中。您必须先删除现有的软件包版本。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。您无法将具有相同名称的文件两次发布到软件包中。您必须先删除现有的软件包版本。 服务器将以以下HTTP状态码响应。 diff --git a/doc/usage/packages/rubygems.en-us.md b/usage/packages/rubygems.en-us.md similarity index 93% rename from doc/usage/packages/rubygems.en-us.md rename to usage/packages/rubygems.en-us.md index 5cfebfc8..cb1a225b 100644 --- a/doc/usage/packages/rubygems.en-us.md +++ b/usage/packages/rubygems.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "RubyGems Package Registry" slug: "rubygems" -weight: 110 +sidebar_position: 110 draft: false toc: false menu: sidebar: parent: "packages" name: "RubyGems" - weight: 110 + sidebar_position: 110 identifier: "rubygems" --- @@ -17,10 +17,6 @@ menu: Publish [RubyGems](https://guides.rubygems.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the RubyGems package registry, you need to use the [gem](https://guides.rubygems.org/command-reference/) command line tool to consume and publish packages. @@ -37,7 +33,7 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token} | Parameter | Description | | ------------- | ----------- | | `owner` | The owner of the package. | -| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). | +| `token` | Your [personal access token](development/api-usage.md#authentication). | For example: diff --git a/doc/usage/packages/rubygems.zh-cn.md b/usage/packages/rubygems.zh-cn.md similarity index 94% rename from doc/usage/packages/rubygems.zh-cn.md rename to usage/packages/rubygems.zh-cn.md index f3416c23..71db4aaa 100644 --- a/doc/usage/packages/rubygems.zh-cn.md +++ b/usage/packages/rubygems.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "RubyGems 软件包注册表" slug: "rubygems" -weight: 110 +sidebar_position: 110 draft: false toc: false menu: sidebar: parent: "packages" name: "RubyGems" - weight: 110 + sidebar_position: 110 identifier: "rubygems" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [RubyGems](https://guides.rubygems.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用RubyGems软件包注册表,您需要使用 [gem](https://guides.rubygems.org/command-reference/) 命令行工具来消费和发布软件包。 @@ -37,7 +33,7 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token} | 参数 | 描述 | | ------- | ------------------------------------------------------------------------------------- | | `owner` | 软件包的所有者 | -| `token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}) | +| `token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证) | 例如: diff --git a/doc/usage/packages/storage.en-us.md b/usage/packages/storage.en-us.md similarity index 89% rename from doc/usage/packages/storage.en-us.md rename to usage/packages/storage.en-us.md index bf500f3b..f437412d 100644 --- a/doc/usage/packages/storage.en-us.md +++ b/usage/packages/storage.en-us.md @@ -2,14 +2,14 @@ date: "2022-11-01T00:00:00+00:00" title: "Storage" slug: "storage" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Storage" - weight: 2 + sidebar_position: 2 identifier: "storage" --- @@ -17,10 +17,6 @@ menu: This document describes the storage of the package registry and how it can be managed. -**Table of Contents** - -{{< toc >}} - ## Deduplication The package registry has a build-in deduplication of uploaded blobs. @@ -32,7 +28,7 @@ Whenever a package gets deleted, only the references to the underlying blobs are The blobs get not removed at this moment, so they still require space on the filesystem. When a new package gets uploaded the existing blobs may get referenced again. -These unreferenced blobs get deleted by a [clean up job]({{< relref "doc/administration/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}). +These unreferenced blobs get deleted by a [clean up job](administration/config-cheat-sheet.md#cron---cleanup-expired-packages-croncleanup_packages). The config setting `OLDER_THAN` configures how long unreferenced blobs are kept before they get deleted. ## Cleanup Rules @@ -72,7 +68,7 @@ The patterns are case-insensitive which matches the behaviour of the package reg ### How the cleanup rules work -The cleanup rules are part of the [clean up job]({{< relref "doc/administration/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}) and run periodically. +The cleanup rules are part of the [clean up job](administration/config-cheat-sheet.md#cron---cleanup-expired-packages-croncleanup_packages) and run periodically. The cleanup rule: diff --git a/doc/usage/packages/storage.zh-cn.md b/usage/packages/storage.zh-cn.md similarity index 99% rename from doc/usage/packages/storage.zh-cn.md rename to usage/packages/storage.zh-cn.md index 7845f40c..3832e80c 100644 --- a/doc/usage/packages/storage.zh-cn.md +++ b/usage/packages/storage.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-11-01T00:00:00+00:00" title: "存储" slug: "storage" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Storage" - weight: 2 + sidebar_position: 2 identifier: "storage" --- @@ -17,10 +17,6 @@ menu: 本文档描述了软件包注册表的存储方式以及如何管理存储。 -**目录** - -{{< toc >}} - ## 去重 软件包注册表具有内置的去重功能,可以对上传的 Blob 进行去重处理。 diff --git a/doc/usage/packages/swift.en-us.md b/usage/packages/swift.en-us.md similarity index 89% rename from doc/usage/packages/swift.en-us.md rename to usage/packages/swift.en-us.md index 6d4d0f24..1bc271dd 100644 --- a/doc/usage/packages/swift.en-us.md +++ b/usage/packages/swift.en-us.md @@ -2,14 +2,14 @@ date: "2023-01-10T00:00:00+00:00" title: "Swift Package Registry" slug: "swift" -weight: 95 +sidebar_position: 95 draft: false toc: false menu: sidebar: parent: "packages" name: "Swift" - weight: 95 + sidebar_position: 95 identifier: "swift" --- @@ -17,10 +17,6 @@ menu: Publish [Swift](https://www.swift.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Swift package registry, you need to use [swift](https://www.swift.org/getting-started/) to consume and a HTTP client (like `curl`) to publish packages. @@ -37,7 +33,7 @@ swift package-registry set https://gitea.example.com/api/packages/{owner}/swift | ------------ | ----------- | | `owner` | The owner of the package. | | `username` | Your Gitea username. | -| `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. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | The login is optional and only needed if the package registry is private. @@ -62,7 +58,7 @@ curl -X PUT --user {username}:{password} \ | Placeholder | Description | | ----------- | ----------- | | `username` | Your Gitea username. | -| `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. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | | `owner` | The owner of the package. | | `scope` | The package scope. | | `name` | The package name. | diff --git a/doc/usage/packages/swift.zh-cn.md b/usage/packages/swift.zh-cn.md similarity index 92% rename from doc/usage/packages/swift.zh-cn.md rename to usage/packages/swift.zh-cn.md index 9c627416..595a705e 100644 --- a/doc/usage/packages/swift.zh-cn.md +++ b/usage/packages/swift.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-01-10T00:00:00+00:00" title: "Swift 软件包注册表" slug: "swift" -weight: 95 +sidebar_position: 95 draft: false toc: false menu: sidebar: parent: "packages" name: "Swift" - weight: 95 + sidebar_position: 95 identifier: "swift" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Swift](https://www.swift.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Swift 软件包注册表,您需要使用 [swift](https://www.swift.org/getting-started/) 消费软件包,并使用 HTTP 客户端(如 `curl`)发布软件包。 @@ -37,7 +33,7 @@ swift package-registry set https://gitea.example.com/api/packages/{owner}/swift | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `owner` | 软件包的所有者。 | | `username` | 您的 Gitea 用户名。 | -| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})代替密码。 | +| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)代替密码。 | 登录是可选的,只有在软件包注册表是私有的情况下才需要。 @@ -62,7 +58,7 @@ curl -X PUT --user {username}:{password} \ | 占位符 | 描述 | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `username` | 您的 Gitea 用户名。 | -| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})代替密码。 | +| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)代替密码。 | | `owner` | 软件包的所有者。 | | `scope` | 软件包的作用域。 | | `name` | 软件包的名称。 | diff --git a/doc/usage/packages/vagrant.en-us.md b/usage/packages/vagrant.en-us.md similarity index 91% rename from doc/usage/packages/vagrant.en-us.md rename to usage/packages/vagrant.en-us.md index 583bbc19..93cf5e3e 100644 --- a/doc/usage/packages/vagrant.en-us.md +++ b/usage/packages/vagrant.en-us.md @@ -2,14 +2,14 @@ date: "2022-08-23T00:00:00+00:00" title: "Vagrant Package Registry" slug: "vagrant" -weight: 120 +sidebar_position: 120 draft: false toc: false menu: sidebar: parent: "packages" name: "Vagrant" - weight: 120 + sidebar_position: 120 identifier: "vagrant" --- @@ -17,10 +17,6 @@ menu: Publish [Vagrant](https://www.vagrantup.com/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Vagrant package registry, you need [Vagrant](https://www.vagrantup.com/downloads) and a tool to make HTTP requests like `curl`. @@ -70,7 +66,7 @@ vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_sy ``` This will install the latest version of the package. To add a specific version, use the `--box-version` parameter. -If the registry is private you can pass your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) in the `VAGRANT_CLOUD_TOKEN` environment variable. +If the registry is private you can pass your [personal access token](development/api-usage.md#authentication) in the `VAGRANT_CLOUD_TOKEN` environment variable. ## Supported commands diff --git a/doc/usage/packages/vagrant.zh-cn.md b/usage/packages/vagrant.zh-cn.md similarity index 92% rename from doc/usage/packages/vagrant.zh-cn.md rename to usage/packages/vagrant.zh-cn.md index ddcec9e4..67d79ad3 100644 --- a/doc/usage/packages/vagrant.zh-cn.md +++ b/usage/packages/vagrant.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-08-23T00:00:00+00:00" title: "Vagrant 软件包注册表" slug: "vagrant" -weight: 120 +sidebar_position: 120 draft: false toc: false menu: sidebar: parent: "packages" name: "Vagrant" - weight: 120 + sidebar_position: 120 identifier: "vagrant" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Vagrant](https://www.vagrantup.com/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Vagrant 软件包注册表,您需要安装 [Vagrant](https://www.vagrantup.com/downloads) 并使用类似于 `curl` 的工具进行 HTTP 请求。 @@ -70,7 +66,7 @@ vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_sy ``` 这将安装软件包的最新版本。要添加特定版本,请使用` --box-version` 参数。 -如果注册表是私有的,您可以将您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})传递给 `VAGRANT_CLOUD_TOKEN` 环境变量。 +如果注册表是私有的,您可以将您的[个人访问令牌](development/api-usage.md#通过-api-认证)传递给 `VAGRANT_CLOUD_TOKEN` 环境变量。 ## 支持的命令 diff --git a/doc/usage/permissions.en-us.md b/usage/permissions.en-us.md similarity index 98% rename from doc/usage/permissions.en-us.md rename to usage/permissions.en-us.md index 655c67de..1e0c6c0b 100644 --- a/doc/usage/permissions.en-us.md +++ b/usage/permissions.en-us.md @@ -2,7 +2,7 @@ date: "2021-12-13:10:10+08:00" title: "Permissions" slug: "permissions" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Permissions" - weight: 14 + sidebar_position: 14 identifier: "permissions" --- # Permissions -**Table of Contents** - -{{< toc >}} - Gitea supports permissions for repository so that you can give different access for different people. At first, we need to know about `Unit`. ## Unit diff --git a/doc/usage/permissions.zh-cn.md b/usage/permissions.zh-cn.md similarity index 98% rename from doc/usage/permissions.zh-cn.md rename to usage/permissions.zh-cn.md index 31636335..5e1688f7 100644 --- a/doc/usage/permissions.zh-cn.md +++ b/usage/permissions.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "权限" slug: "permissions" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "权限" - weight: 14 + sidebar_position: 14 identifier: "permissions" --- # 权限 -**目录** - -{{< toc >}} - Gitea 支持对仓库进行权限管理,这样您就可以为不同的人员提供不同的访问权限。首先,我们需要了解 `单元(Unit)`。 ## 单元(Unit) diff --git a/doc/usage/profile-readme.en-us.md b/usage/profile-readme.en-us.md similarity index 94% rename from doc/usage/profile-readme.en-us.md rename to usage/profile-readme.en-us.md index a290eadb..fbe175ee 100644 --- a/doc/usage/profile-readme.en-us.md +++ b/usage/profile-readme.en-us.md @@ -2,14 +2,14 @@ date: "2023-03-02T21:00:00+05:00" title: "Profile READMEs" slug: "profile-readme" -weight: 12 +sidebar_position: 12 toc: false draft: false menu: sidebar: parent: "usage" name: "Profile READMEs" - weight: 12 + sidebar_position: 12 identifier: "profile-readme" --- diff --git a/doc/usage/profile-readme.zh-cn.md b/usage/profile-readme.zh-cn.md similarity index 94% rename from doc/usage/profile-readme.zh-cn.md rename to usage/profile-readme.zh-cn.md index a253fcaf..804f69d2 100644 --- a/doc/usage/profile-readme.zh-cn.md +++ b/usage/profile-readme.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-23T09:00:00+08:00" title: "个人资料 README" slug: "profile-readme" -weight: 12 +sidebar_position: 12 toc: false draft: false menu: sidebar: parent: "usage" name: "个人资料 README" - weight: 12 + sidebar_position: 12 identifier: "profile-readme" --- diff --git a/doc/usage/protected-tags.en-us.md b/usage/protected-tags.en-us.md similarity index 97% rename from doc/usage/protected-tags.en-us.md rename to usage/protected-tags.en-us.md index c5e76365..b25cbdbb 100644 --- a/doc/usage/protected-tags.en-us.md +++ b/usage/protected-tags.en-us.md @@ -2,7 +2,7 @@ date: "2021-05-14T00:00:00-00:00" title: "Protected tags" slug: "protected-tags" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Protected tags" - weight: 45 + sidebar_position: 45 identifier: "protected-tags" --- @@ -19,10 +19,6 @@ menu: Protected tags allow control over who has permission to create or update Git tags. Each rule allows you to match either an individual tag name, or use an appropriate pattern to control multiple tags at once. -**Table of Contents** - -{{< toc >}} - ## Setting up protected tags To protect a tag, you need to follow these steps: diff --git a/doc/usage/protected-tags.zh-cn.md b/usage/protected-tags.zh-cn.md similarity index 98% rename from doc/usage/protected-tags.zh-cn.md rename to usage/protected-tags.zh-cn.md index 7d43462d..0529bf79 100644 --- a/doc/usage/protected-tags.zh-cn.md +++ b/usage/protected-tags.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "受保护的标签" slug: "protected-tags" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "受保护的标签" - weight: 45 + sidebar_position: 45 identifier: "protected-tags" --- @@ -19,10 +19,6 @@ menu: 受保护的标签允许控制谁有权限创建或更新 Git 标签。每个规则可以匹配单个标签名称,或者使用适当的模式来同时控制多个标签。 -**目录** - -{{< toc >}} - ## 设置受保护的标签 要保护一个标签,你需要按照以下步骤进行操作: diff --git a/doc/usage/pull-request.en-us.md b/usage/pull-request.en-us.md similarity index 98% rename from doc/usage/pull-request.en-us.md rename to usage/pull-request.en-us.md index f9f4b385..8c94ee68 100644 --- a/doc/usage/pull-request.en-us.md +++ b/usage/pull-request.en-us.md @@ -2,7 +2,7 @@ date: "2018-06-01T19:00:00+02:00" title: "Pull Request" slug: "pull-request" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Pull Request" - weight: 13 + sidebar_position: 13 identifier: "pull-request" --- diff --git a/doc/usage/pull-request.zh-cn.md b/usage/pull-request.zh-cn.md similarity index 94% rename from doc/usage/pull-request.zh-cn.md rename to usage/pull-request.zh-cn.md index baf57787..db5646f3 100644 --- a/doc/usage/pull-request.zh-cn.md +++ b/usage/pull-request.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-06-01T19:00:00+02:00" title: "合并请求" slug: "pull-request" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Pull Request" - weight: 13 + sidebar_position: 13 identifier: "pull-request" --- diff --git a/doc/usage/pull-request.zh-tw.md b/usage/pull-request.zh-tw.md similarity index 94% rename from doc/usage/pull-request.zh-tw.md rename to usage/pull-request.zh-tw.md index 9bbfa878..14d1b495 100644 --- a/doc/usage/pull-request.zh-tw.md +++ b/usage/pull-request.zh-tw.md @@ -2,7 +2,7 @@ date: "2018-06-01T19:00:00+02:00" title: "合併請求" slug: "pull-request" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "合併請求" - weight: 13 + sidebar_position: 13 identifier: "pull-request" --- diff --git a/doc/usage/push.en-us.md b/usage/push.en-us.md similarity index 92% rename from doc/usage/push.en-us.md rename to usage/push.en-us.md index 45190d88..d88dc1a2 100644 --- a/doc/usage/push.en-us.md +++ b/usage/push.en-us.md @@ -2,7 +2,7 @@ date: "2020-07-06T16:00:00+02:00" title: "Push" slug: "push" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -12,14 +12,10 @@ menu: sidebar: parent: "usage" name: "Push" - weight: 15 + sidebar_position: 15 identifier: "push" --- -**Table of Contents** - -{{< toc >}} - There are some additional features when pushing commits to Gitea server. # Open PR through Push @@ -55,7 +51,7 @@ Push to create is a feature that allows you to push to a repository that does no ## Enabling Push To Create -In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository-repository" >}}). +In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#repository-repository). ## Using Push To Create diff --git a/doc/usage/push.zh-cn.md b/usage/push.zh-cn.md similarity index 90% rename from doc/usage/push.zh-cn.md rename to usage/push.zh-cn.md index a12e1b53..f9fd687c 100644 --- a/doc/usage/push.zh-cn.md +++ b/usage/push.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "推送" slug: "push" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -12,14 +12,10 @@ menu: sidebar: parent: "usage" name: "推送" - weight: 15 + sidebar_position: 15 identifier: "push" --- -**目录** - -{{< toc >}} - 在将提交推送到 Gitea 服务器时,还有一些额外的功能。 # 通过推送打开 PR @@ -53,7 +49,7 @@ git push -o repo.private=false -u origin main ## 启用推送创建 -在 `app.ini` 文件中,将 `ENABLE_PUSH_CREATE_USER` 设置为 `true`,如果您希望允许用户在自己的用户帐户和所属的组织中创建仓库,将 `ENABLE_PUSH_CREATE_ORG` 设置为 `true`。重新启动 Gitea 以使更改生效。您可以在 [配置速查表]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#repository-repository" >}}) 中了解有关这两个选项的更多信息。 +在 `app.ini` 文件中,将 `ENABLE_PUSH_CREATE_USER` 设置为 `true`,如果您希望允许用户在自己的用户帐户和所属的组织中创建仓库,将 `ENABLE_PUSH_CREATE_ORG` 设置为 `true`。重新启动 Gitea 以使更改生效。您可以在 [配置速查表](administration/config-cheat-sheet.md#repository-repository) 中了解有关这两个选项的更多信息。 ## 使用推送创建 diff --git a/doc/usage/push.zh-tw.md b/usage/push.zh-tw.md similarity index 91% rename from doc/usage/push.zh-tw.md rename to usage/push.zh-tw.md index 5fe5052c..ccecbf62 100644 --- a/doc/usage/push.zh-tw.md +++ b/usage/push.zh-tw.md @@ -2,7 +2,7 @@ date: "2020-07-06T16:00:00+02:00" title: "使用: Push" slug: "push" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,14 +11,10 @@ menu: sidebar: parent: "usage" name: "Push" - weight: 15 + sidebar_position: 15 identifier: "push" --- -**Table of Contents** - -{{< toc >}} - There are some additional features when pushing commits to Gitea server. # Push Merge Hint @@ -54,7 +50,7 @@ Push to create is a feature that allows you to push to a repository that does no ## Enabling Push To Create -In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.zh-tw.md#repository-repository" >}}). +In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#repository-repository). ## Using Push To Create diff --git a/doc/usage/repo-mirror.en-us.md b/usage/repo-mirror.en-us.md similarity index 98% rename from doc/usage/repo-mirror.en-us.md rename to usage/repo-mirror.en-us.md index 157b6c12..4a657103 100644 --- a/doc/usage/repo-mirror.en-us.md +++ b/usage/repo-mirror.en-us.md @@ -2,7 +2,7 @@ date: "2021-05-13T00:00:00-00:00" title: "Repository Mirror" slug: "repo-mirror" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Repository Mirror" - weight: 45 + sidebar_position: 45 identifier: "repo-mirror" --- @@ -19,10 +19,6 @@ menu: Repository mirroring allows for the mirroring of repositories to and from external sources. You can use it to mirror branches, tags, and commits between repositories. -**Table of Contents** - -{{< toc >}} - ## Use cases The following are some possible use cases for repository mirroring: diff --git a/doc/usage/repo-mirror.zh-cn.md b/usage/repo-mirror.zh-cn.md similarity index 98% rename from doc/usage/repo-mirror.zh-cn.md rename to usage/repo-mirror.zh-cn.md index d327338b..3723b81e 100644 --- a/doc/usage/repo-mirror.zh-cn.md +++ b/usage/repo-mirror.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "仓库镜像" slug: "repo-mirror" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "仓库镜像" - weight: 45 + sidebar_position: 45 identifier: "repo-mirror" --- @@ -19,10 +19,6 @@ menu: 仓库镜像允许将仓库与外部源之间进行镜像。您可以使用它在仓库之间镜像分支、标签和提交。 -**目录** - -{{< toc >}} - ## 使用场景 以下是一些仓库镜像的可能使用场景: diff --git a/doc/usage/secrets.en-us.md b/usage/secrets.en-us.md similarity index 89% rename from doc/usage/secrets.en-us.md rename to usage/secrets.en-us.md index c193a54a..8ad67466 100644 --- a/doc/usage/secrets.en-us.md +++ b/usage/secrets.en-us.md @@ -2,7 +2,7 @@ date: "2022-12-19T21:26:00+08:00" title: "Secrets" slug: "secrets" -weight: 50 +sidebar_position: 50 draft: false toc: false aliases: @@ -11,14 +11,14 @@ menu: sidebar: parent: "usage" name: "Secrets" - weight: 50 + sidebar_position: 50 identifier: "usage-secrets" --- # Secrets Secrets allow you to store sensitive information in your user, organization or repository. -Secrets are available on Gitea 1.19+. +Secrets are available on Gitea 1.19+ and are only visible in 1.20+ when ACTIONS are enabled. # Naming your secrets diff --git a/doc/usage/secrets.zh-cn.md b/usage/secrets.zh-cn.md similarity index 96% rename from doc/usage/secrets.zh-cn.md rename to usage/secrets.zh-cn.md index 534fc52e..40e80dc7 100644 --- a/doc/usage/secrets.zh-cn.md +++ b/usage/secrets.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "密钥管理" slug: "secrets" -weight: 50 +sidebar_position: 50 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "密钥管理" - weight: 50 + sidebar_position: 50 identifier: "usage-secrets" --- diff --git a/doc/usage/template-repositories.en-us.md b/usage/template-repositories.en-us.md similarity index 98% rename from doc/usage/template-repositories.en-us.md rename to usage/template-repositories.en-us.md index 0c278648..66b2d54b 100644 --- a/doc/usage/template-repositories.en-us.md +++ b/usage/template-repositories.en-us.md @@ -2,7 +2,7 @@ date: "2019-11-28:00:00+02:00" title: "Template Repositories" slug: "template-repositories" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Template Repositories" - weight: 14 + sidebar_position: 14 identifier: "template-repositories" --- # Template Repositories -**Table of Contents** - -{{< toc >}} - Gitea `1.11.0` and above includes template repositories, and one feature implemented with them is auto-expansion of specific variables within your template files. To tell Gitea which files to expand, you must include a `template` file inside the `.gitea` directory of the template repository. diff --git a/doc/usage/template-repositories.zh-cn.md b/usage/template-repositories.zh-cn.md similarity index 98% rename from doc/usage/template-repositories.zh-cn.md rename to usage/template-repositories.zh-cn.md index f8dfe106..68881e02 100644 --- a/doc/usage/template-repositories.zh-cn.md +++ b/usage/template-repositories.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "模板仓库" slug: "template-repositories" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "模板仓库" - weight: 14 + sidebar_position: 14 identifier: "template-repositories" --- # 模板仓库 -**目录** - -{{< toc >}} - Gitea `1.11.0` 及以上版本引入了模板仓库,并且其中一个实现的功能是自动展开模板文件中的特定变量。 要告诉 Gitea 哪些文件需要展开,您必须在模板仓库的 `.gitea` 目录中包含一个 `template` 文件。 diff --git a/doc/usage/webhooks.en-us.md b/usage/webhooks.en-us.md similarity index 99% rename from doc/usage/webhooks.en-us.md rename to usage/webhooks.en-us.md index 24cd48c9..684911f8 100644 --- a/doc/usage/webhooks.en-us.md +++ b/usage/webhooks.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Webhooks" slug: "webhooks" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Webhooks" - weight: 30 + sidebar_position: 30 identifier: "webhooks" --- diff --git a/doc/usage/webhooks.zh-cn.md b/usage/webhooks.zh-cn.md similarity index 99% rename from doc/usage/webhooks.zh-cn.md rename to usage/webhooks.zh-cn.md index 412dad25..dfc70994 100644 --- a/doc/usage/webhooks.zh-cn.md +++ b/usage/webhooks.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Webhooks" slug: "webhooks" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Webhooks" - weight: 30 + sidebar_position: 30 identifier: "webhooks" --- diff --git a/doc/usage/webhooks.zh-tw.md b/usage/webhooks.zh-tw.md similarity index 99% rename from doc/usage/webhooks.zh-tw.md rename to usage/webhooks.zh-tw.md index ca599135..666dcee8 100644 --- a/doc/usage/webhooks.zh-tw.md +++ b/usage/webhooks.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Webhook" slug: "webhooks" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Webhook" - weight: 30 + sidebar_position: 30 identifier: "webhooks" --- From b7dd3ee047f3ae4ea03233193ff20185cdff231c Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 26 Jul 2023 01:32:41 -0400 Subject: [PATCH 18/42] Remove "misc" scope check from public API endpoints (#26134) (#26149) Backport #26134 by @wxiaoguang Fix #26035 Co-authored-by: wxiaoguang --- development/oauth2-provider.en-us.md | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/development/oauth2-provider.en-us.md b/development/oauth2-provider.en-us.md index 11e995f0..b3824f4b 100644 --- a/development/oauth2-provider.en-us.md +++ b/development/oauth2-provider.en-us.md @@ -47,36 +47,36 @@ Gitea supports scoped access tokens, which allow users the ability to restrict t Gitea token scopes are as follows: -| Name | Description | -| ---- |--------------------------------------------------------------------------------------------------------------------------------------------------| -| **(no scope)** | Not supported. A scope is required even for public repositories. | -| **activitypub** | `activitypub` API routes: ActivityPub related operations. | -|     **read:activitypub** | Grants read access for ActivityPub operations. | -|     **write:activitypub** | Grants read/write/delete access for ActivityPub operations. | -| **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). | -|     **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. | -|     **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. | | -| **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. | -|     **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. | -|     **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. | -| **misc** | miscellaneous and settings top-level API routes. | -|     **read:misc** | Grants read access to miscellaneous operations, such as getting label and gitignore templates. | -|     **write:misc** | Grants read/write/delete access to miscellaneous operations, such as markup utility operations. | -| **notification** | `notification/*` API routes: user notification operations. | -|     **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. | -|     **write:notification** | Grants read/write/delete access to user notifications, such as marking notifications as read. | -| **organization** | `orgs/*` and `teams/*` API routes: Organization and team management operations. | -|     **read:organization** | Grants read access to org and team status, such as listing all orgs a user has visibility to, teams, and team members. | -|     **write:organization** | Grants read/write/delete access to org and team status, such as creating and updating teams and updating org settings. | -| **package** | `/packages/*` API routes: Packages operations | -|     **read:package** | Grants read access to package operations, such as reading and downloading available packages. | -|     **write:package** | Grants read/write/delete access to package operations. Currently the same as `read:package`. | -| **repository** | `/repos/*` API routes except `/repos/issues/*`: Repository file, pull-request, and release operations. | -|     **read:repository** | Grants read access to repository operations, such as getting repository files, releases, collaborators. | -|     **write:repository** | Grants read/write/delete access to repository operations, such as getting updating repository files, creating pull requests, updating collaborators. | -| **user** | `/user/*` and `/users/*` API routes: User-related operations. | -|     **read:user** | Grants read access to user operations, such as getting user repo subscriptions and user settings. | -|     **write:user** | Grants read/write/delete access to user operations, such as updating user repo subscriptions, followed users, and user settings. | +| Name | Description | +| ---- |------------------------------------------------------------------------------------------------------------------------------------------------------| +| **(no scope)** | Not supported. A scope is required even for public repositories. | +| **activitypub** | `activitypub` API routes: ActivityPub related operations. | +|     **read:activitypub** | Grants read access for ActivityPub operations. | +|     **write:activitypub** | Grants read/write/delete access for ActivityPub operations. | +| **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). | +|     **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. | +|     **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. | +| **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. | +|     **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. | +|     **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. | +| **misc** | Reserved for future usage. | +|     **read:misc** | Reserved for future usage. | +|     **write:misc** | Reserved for future usage. | +| **notification** | `notification/*` API routes: user notification operations. | +|     **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. | +|     **write:notification** | Grants read/write/delete access to user notifications, such as marking notifications as read. | +| **organization** | `orgs/*` and `teams/*` API routes: Organization and team management operations. | +|     **read:organization** | Grants read access to org and team status, such as listing all orgs a user has visibility to, teams, and team members. | +|     **write:organization** | Grants read/write/delete access to org and team status, such as creating and updating teams and updating org settings. | +| **package** | `/packages/*` API routes: Packages operations | +|     **read:package** | Grants read access to package operations, such as reading and downloading available packages. | +|     **write:package** | Grants read/write/delete access to package operations. Currently the same as `read:package`. | +| **repository** | `/repos/*` API routes except `/repos/issues/*`: Repository file, pull-request, and release operations. | +|     **read:repository** | Grants read access to repository operations, such as getting repository files, releases, collaborators. | +|     **write:repository** | Grants read/write/delete access to repository operations, such as getting updating repository files, creating pull requests, updating collaborators. | +| **user** | `/user/*` and `/users/*` API routes: User-related operations. | +|     **read:user** | Grants read access to user operations, such as getting user repo subscriptions and user settings. | +|     **write:user** | Grants read/write/delete access to user operations, such as updating user repo subscriptions, followed users, and user settings. | ## Client types From ac3724c305bb25d2c8fba521bc184239a80f3dc4 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 26 Jul 2023 23:55:27 +0800 Subject: [PATCH 19/42] Update email-setup.en-us.md (#26068) (#26166) Backport #26068 by @felixvictor The setting `MAILER_TYPE` is deprecated. According to the config cheat sheet, it should be `PROTOCOL`. Co-authored-by: Felix Victor Co-authored-by: Lunny Xiao --- administration/email-setup.en-us.md | 7 +++---- administration/email-setup.zh-cn.md | 8 +++----- installation/with-docker-rootless.en-us.md | 2 +- installation/with-docker-rootless.zh-cn.md | 2 +- installation/with-docker.en-us.md | 3 +-- installation/with-docker.zh-cn.md | 3 +-- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/administration/email-setup.en-us.md b/administration/email-setup.en-us.md index 2f92e204..10058d82 100644 --- a/administration/email-setup.en-us.md +++ b/administration/email-setup.en-us.md @@ -31,7 +31,7 @@ Note: For Internet-facing sites consult documentation of your MTA for instructio [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = sendmail +PROTOCOL = sendmail SENDMAIL_PATH = /usr/sbin/sendmail SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option. ``` @@ -44,10 +44,9 @@ Directly use SMTP server as relay. This option is useful if you don't want to se [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = smtp +PROTOCOL = smtps SMTP_ADDR = mail.mydomain.com SMTP_PORT = 587 -IS_TLS_ENABLED = true USER = gitea@mydomain.com PASSWD = `password` ``` @@ -80,7 +79,7 @@ SMTP_PORT = 465 FROM = example.user@gmail.com USER = example.user PASSWD = `***` -MAILER_TYPE = smtp +PROTOCOL = smtp IS_TLS_ENABLED = true ``` diff --git a/administration/email-setup.zh-cn.md b/administration/email-setup.zh-cn.md index e526a9d4..0a7ac337 100644 --- a/administration/email-setup.zh-cn.md +++ b/administration/email-setup.zh-cn.md @@ -31,7 +31,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = sendmail +PROTOCOL = sendmail SENDMAIL_PATH = /usr/sbin/sendmail SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 将防止电子邮件地址被解释为选项。 ``` @@ -44,10 +44,9 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = smtp +PROTOCOL = smtps SMTP_ADDR = mail.mydomain.com SMTP_PORT = 587 -IS_TLS_ENABLED = true USER = gitea@mydomain.com PASSWD = `password` ``` @@ -80,8 +79,7 @@ SMTP_PORT = 465 FROM = example.user@gmail.com USER = example.user PASSWD = `***` -MAILER_TYPE = smtp -IS_TLS_ENABLED = true +PROTOCOL = smtps ``` 请注意,您需要创建并使用一个 [应用密码](https://support.google.com/accounts/answer/185833?hl=en) 并在您的 Google 帐户上启用 2FA。您将无法直接使用您的 Google 帐户密码。 diff --git a/installation/with-docker-rootless.en-us.md b/installation/with-docker-rootless.en-us.md index 3c81c863..fc99819d 100644 --- a/installation/with-docker-rootless.en-us.md +++ b/installation/with-docker-rootless.en-us.md @@ -306,7 +306,7 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtp - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} diff --git a/installation/with-docker-rootless.zh-cn.md b/installation/with-docker-rootless.zh-cn.md index 1910e0a8..9d5013ea 100644 --- a/installation/with-docker-rootless.zh-cn.md +++ b/installation/with-docker-rootless.zh-cn.md @@ -274,7 +274,7 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtp - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} diff --git a/installation/with-docker.en-us.md b/installation/with-docker.en-us.md index 7b470460..f5a09e9f 100644 --- a/installation/with-docker.en-us.md +++ b/installation/with-docker.en-us.md @@ -303,9 +303,8 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtps - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` diff --git a/installation/with-docker.zh-cn.md b/installation/with-docker.zh-cn.md index e04d3158..d8cbc2f9 100644 --- a/installation/with-docker.zh-cn.md +++ b/installation/with-docker.zh-cn.md @@ -287,9 +287,8 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtps - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` From 2685a95d6bdf0a6af9a8b106a48e3029032bd214 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 27 Jul 2023 19:24:07 +0800 Subject: [PATCH 20/42] Calculate MAX_WORKERS default value by CPU number (#26177) (#26183) --- administration/config-cheat-sheet.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index d61e23d0..f1b70337 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -485,7 +485,7 @@ Configuration at `[queue]` will set defaults for queues with overrides for indiv - `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. For `redis-cluster` use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR` - `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section. - `SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section. -- `MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue. +- `MAX_WORKERS`: **(dynamic)**: Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10. Gitea creates the following non-unique queues: From 33f0ebc15d5debfb0a45701824b6c85d3172b722 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 1 Aug 2023 23:32:23 +0800 Subject: [PATCH 21/42] Update Arch linux URL from community to extra (#26273) (#26276) Co-authored-by: minijaws --- installation/from-package.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation/from-package.en-us.md b/installation/from-package.en-us.md index 36f3e2db..4c29c31e 100644 --- a/installation/from-package.en-us.md +++ b/installation/from-package.en-us.md @@ -40,7 +40,7 @@ apk add gitea ## Arch Linux -The rolling release distribution has [Gitea](https://www.archlinux.org/packages/community/x86_64/gitea/) in their official community repository and package updates are provided with new Gitea releases. +The rolling release distribution has [Gitea](https://www.archlinux.org/packages/extra/x86_64/gitea/) in their official extra repository and package updates are provided with new Gitea releases. ```sh pacman -S gitea From acd5f33713e65ddf47458bd79820eb4744722000 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 2 Aug 2023 07:08:28 +0800 Subject: [PATCH 22/42] Clarify the logger's MODE config option (#26267) (#26281) Backport #26267 by @wxiaoguang 1. Fix the wrong document (add the missing `MODE=`) 2. Add a more friendly log message to tell users to add `MODE=` in their config Co-authored-by: wxiaoguang --- administration/logging-config.en-us.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/administration/logging-config.en-us.md b/administration/logging-config.en-us.md index d9739e18..33470ca4 100644 --- a/administration/logging-config.en-us.md +++ b/administration/logging-config.en-us.md @@ -102,8 +102,11 @@ MODE = file, file-error ; by default, the "file" mode will record logs to %(log.ROOT_PATH)/gitea.log, so we don't need to set it ; [log.file] +; by default, the MODE (actually it's the output writer of this logger) is taken from the section name, so we don't need to set it either +; MODE = file [log.file-error] +MODE = file LEVEL = Error FILE_NAME = file-error.log ``` From 0f321b631ca9a0c9e1e10e8275016ce0348f8c3c Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sat, 5 Aug 2023 23:42:45 +0800 Subject: [PATCH 23/42] Remove backslashed newlines on markdown (#26344) (#26348) Backport #26344 by @lunny Fix https://gitea.com/gitea/gitea-docusaurus/issues/56 Co-authored-by: Lunny Xiao --- usage/agit-support.en-us.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usage/agit-support.en-us.md b/usage/agit-support.en-us.md index 25523efe..b1643d27 100644 --- a/usage/agit-support.en-us.md +++ b/usage/agit-support.en-us.md @@ -21,8 +21,8 @@ In Gitea `1.13`, support for [agit](https://git-repo.info/en/2020/03/agit-flow-a ## Creating PRs with Agit -Agit allows to create PRs while pushing code to the remote repo. \ -This can be done by pushing to the branch followed by a specific refspec (a location identifier known to git). \ +Agit allows to create PRs while pushing code to the remote repo. +This can be done by pushing to the branch followed by a specific refspec (a location identifier known to git). The following example illustrates this: ```shell From a1e8e6a7aa4207a2a3813aae2b6a25f49b722836 Mon Sep 17 00:00:00 2001 From: Brian Lachniet Date: Sun, 6 Aug 2023 12:02:43 -0400 Subject: [PATCH 24/42] [docs] Fix Gmail configuration (#26356) --- administration/email-setup.en-us.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/administration/email-setup.en-us.md b/administration/email-setup.en-us.md index 10058d82..5bb417fe 100644 --- a/administration/email-setup.en-us.md +++ b/administration/email-setup.en-us.md @@ -79,8 +79,9 @@ SMTP_PORT = 465 FROM = example.user@gmail.com USER = example.user PASSWD = `***` -PROTOCOL = smtp -IS_TLS_ENABLED = true +PROTOCOL = smtps ; Gitea >= 1.19.0 +; PROTOCOL = smtp ; Gitea < 1.19.0 +; IS_TLS_ENABLED = true ; Gitea < 1.19.0 ``` Note that you'll need to create and use an [App password](https://support.google.com/accounts/answer/185833?hl=en) by enabling 2FA on your Google From a7c11fc8e2557885d5876cacd6668894dc863eae Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 7 Aug 2023 03:57:21 +0800 Subject: [PATCH 25/42] [docs] Add missing backtick in quickstart.zh-cn.md (#26349) (#26357) --- usage/actions/quickstart.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/actions/quickstart.zh-cn.md b/usage/actions/quickstart.zh-cn.md index 564ee03c..252529e0 100644 --- a/usage/actions/quickstart.zh-cn.md +++ b/usage/actions/quickstart.zh-cn.md @@ -123,7 +123,7 @@ jobs: 请注意,演示文件中包含一些表情符号。 请确保您的数据库支持它们,特别是在使用MySQL时。 -如果字符集不是`utf8mb4,将出现错误,例如`Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`。 +如果字符集不是`utf8mb4`,将出现错误,例如`Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`。 有关更多信息,请参阅[数据库准备工作](installation/database-preparation.md#mysql)。 或者,您可以从演示文件中删除所有表情符号,然后再尝试一次。 From 9388088951c04a50efd9bbc63f80d53f4343babb Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 11 Aug 2023 14:17:27 +0800 Subject: [PATCH 26/42] Update upgrade documentation to add a check for deprecated configurations (#26451) (#26452) Backport #26451 by @lunny fix https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710 Co-authored-by: Lunny Xiao Co-authored-by: silverwind --- installation/upgrade-from-gitea.en-us.md | 17 +++++++++++++---- installation/upgrade-from-gitea.zh-cn.md | 16 ++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/installation/upgrade-from-gitea.en-us.md b/installation/upgrade-from-gitea.en-us.md index 9b82de46..984f2d13 100644 --- a/installation/upgrade-from-gitea.en-us.md +++ b/installation/upgrade-from-gitea.en-us.md @@ -17,16 +17,20 @@ menu: # Upgrade from an old Gitea -To update Gitea, download a newer version, stop the old one, perform a backup, and run the new one. -Every time a Gitea instance starts up, it checks whether a database migration should be run. -If a database migration is required, Gitea will take some time to complete the upgrade and then serve. +Follow below steps to ensure a smooth upgrade to a new Gitea version. ## Check the Changelog for breaking changes To make Gitea better, some breaking changes are unavoidable, especially for big milestone releases. -Before upgrade, please read the [Changelog on Gitea blog](https://blog.gitea.io/) +Before upgrading, please read the [Changelog on Gitea blog](https://blog.gitea.com/) and check whether the breaking changes affect your Gitea instance. +## Verify there are no deprecated configuration options + +New versions of Gitea often come with changed configuration syntax or options which are usually displayed for +at least one release cycle inside at the top of the Site Administration panel. If these warnings are not +resolved, Gitea may refuse to start in the following version. + ## Backup for downgrade Gitea keeps compatibility for patch versions whose first two fields are the same (`a.b.x` -> `a.b.y`), @@ -60,6 +64,11 @@ Backup steps: If you are using cloud services or filesystems with snapshot feature, a snapshot for the Gitea data volume and related object storage is more convenient. +After all of steps have been prepared, download the new version, stop the application, perform a backup and +then start the new application. On each startup, Gitea verifies that the database is up to date and will automtically +perform any necessary migrations. Depending on the size of the database, this can take some additional time on the +first launch during which the application will be unavailable. + ## Upgrade with Docker * `docker pull` the latest Gitea release. diff --git a/installation/upgrade-from-gitea.zh-cn.md b/installation/upgrade-from-gitea.zh-cn.md index 8c919e15..6be7127e 100644 --- a/installation/upgrade-from-gitea.zh-cn.md +++ b/installation/upgrade-from-gitea.zh-cn.md @@ -15,16 +15,20 @@ menu: # 从旧版 Gitea 升级 -想要升级 Gitea,只需要下载新版,停止运行旧版,进行数据备份,然后运行新版就好。 -每次 Gitea 实例启动时,它都会检查是否要进行数据库迁移。 -如果需要进行数据库迁移,Gitea 会花一些时间完成升级然后继续服务。 +在升级之前,您需要做如下的准备工作。 ## 为重大变更检查更新日志 为了让 Gitea 变得更好,进行重大变更是不可避免的,尤其是一些里程碑更新的发布。 -在更新前,请 [在 Gitea 博客上阅读更新日志](https://blog.gitea.io/) +在更新前,请 [在 Gitea 博客上阅读更新日志](https://blog.gitea.com/) 并检查重大变更是否会影响你的 Gitea 实例。 +## 在控制面板中检查过期的配置项 + +一些配置项可能会在后续版本中过期,你需要在控制面板中检查他们。如果不解决过期的配置项, +Gitea也许会在升级后无法重启。你可以访问 https://docs.gitea.com 获得要升级的版本 +对应的文档来修改你的配置文件。 + ## 降级前的备份 Gitea 会保留首二位版本号相同的版本的兼容性 (`a.b.x` -> `a.b.y`), @@ -56,6 +60,10 @@ Gitea 会保留首二位版本号相同的版本的兼容性 (`a.b.x` -> `a.b.y` 如果你在使用云服务或拥有快照功能的文件系统, 最好对 Gitea 的数据盘及相关资料存储进行一次快照。 +在所有上述步骤准备妥当之后,要升级 Gitea,只需要下载新版,停止运行旧版,进行数据备份,然后运行新版就好。 +每次 Gitea 实例启动时,它都会检查是否要进行数据库迁移。 +如果需要进行数据库迁移,Gitea 会花一些时间完成升级然后继续服务。 + ## 从 Docker 升级 * `docker pull` 拉取 Gitea 的最新发布版。 From ac0d520fec477ceca643a513f43a2fc5235483b4 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 23 Aug 2023 09:57:01 +0800 Subject: [PATCH 27/42] add mfa doc (#26654) (#26674) Backport #26654 by @lunny copy and modified from #14572 > Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token. I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used. Co-authored-by: Lunny Xiao Co-authored-by: techknowlogick Co-authored-by: silverwind --- usage/multi-factor-authentication.en-us.md | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 usage/multi-factor-authentication.en-us.md diff --git a/usage/multi-factor-authentication.en-us.md b/usage/multi-factor-authentication.en-us.md new file mode 100644 index 00000000..16b57b7b --- /dev/null +++ b/usage/multi-factor-authentication.en-us.md @@ -0,0 +1,35 @@ +--- +date: "2023-08-22T14:21:00+08:00" +title: "Usage: Multi-factor Authentication (MFA)" +slug: "multi-factor-authentication" +weight: 15 +toc: false +draft: false +menu: + sidebar: + parent: "usage" + name: "Multi-factor Authentication (MFA)" + weight: 15 + identifier: "multi-factor-authentication" +--- + +# Multi-factor Authentication (MFA) + +Multi-factor Authentication (also referred to as MFA or 2FA) enhances security by requiring a time-sensitive set of credentials in addition to a password. +If a password were later to be compromised, logging into Gitea will not be possible without the additional credentials and the account would remain secure. +Gitea supports both TOTP (Time-based One-Time Password) tokens and FIDO-based hardware keys using the Webauthn API. + +MFA can be configured within the "Security" tab of the user settings page. + +## MFA Considerations + +Enabling MFA on a user does affect how the Git HTTP protocol can be used with the Git CLI. +This interface does not support MFA, and trying to use a password normally will no longer be possible whilst MFA is enabled. +If SSH is not an option for Git operations, an access token can be generated within the "Applications" tab of the user settings page. +This access token can be used as if it were a password in order to allow the Git CLI to function over HTTP. + +> **Warning** - By its very nature, an access token sidesteps the security benefits of MFA. +> It must be kept secure and should only be used as a last resort. + +The Gitea API supports providing the relevant TOTP password in the `X-Gitea-OTP` header, as described in [API Usage](development/api-usage.md). +This should be used instead of an access token where possible. From de7b8f36e89f16177bad6fda30601512336e2257 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 23 Aug 2023 20:53:44 +0800 Subject: [PATCH 28/42] Prefer variables over subprocesses (#26690) (#26693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #26690 by @thomas-mc-work … because it doesn't require a separate shell, spawning a process which cost unnecessary resources and takes time. Co-authored-by: Thomas McWork --- usage/actions/act-runner.en-us.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usage/actions/act-runner.en-us.md b/usage/actions/act-runner.en-us.md index e3946825..d163dc36 100644 --- a/usage/actions/act-runner.en-us.md +++ b/usage/actions/act-runner.en-us.md @@ -81,7 +81,7 @@ docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate- When you are using the docker image, you can specify the configuration file by using the `CONFIG_FILE` environment variable. Make sure that the file is mounted into the container as a volume: ```bash -docker run -v $(pwd)/config.yaml:/config.yaml -e CONFIG_FILE=/config.yaml ... +docker run -v $PWD/config.yaml:/config.yaml -e CONFIG_FILE=/config.yaml ... ``` You may notice the commands above are both incomplete, because it is not the time to run the act runner yet. @@ -157,8 +157,8 @@ If you are using the docker image, behaviour will be slightly different. Registr ```bash docker run \ - -v $(pwd)/config.yaml:/config.yaml \ - -v $(pwd)/data:/data \ + -v $PWD/config.yaml:/config.yaml \ + -v $PWD/data:/data \ -v /var/run/docker.sock:/var/run/docker.sock \ -e CONFIG_FILE=/config.yaml \ -e GITEA_INSTANCE_URL= \ From 8360939f6fe063dc54140a4db077090fb07f907b Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 25 Aug 2023 13:55:53 +0800 Subject: [PATCH 29/42] Add matrix to support (#26382) (#26722) Backport #26382 by @jolheiser This PR adds our matrix space to the support options and alphabetizes the list. I also considered adding our Mastodon, however that isn't as suitable as the other options because it's just whoever has access to the account vs a community chat/forum. Signed-off-by: jolheiser Co-authored-by: John Olheiser --- help/support.en-us.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/help/support.en-us.md b/help/support.en-us.md index 14407229..24afe67b 100644 --- a/help/support.en-us.md +++ b/help/support.en-us.md @@ -20,6 +20,8 @@ menu: - [Paid Commercial Support](https://about.gitea.com/) - [Discord](https://discord.gg/Gitea) - [Discourse Forum](https://discourse.gitea.io/) +- [Matrix](https://matrix.to/#/#gitea-space:matrix.org) + - NOTE: Most of the Matrix channels are bridged with their counterpart in Discord and may experience some degree of flakiness with the bridge process. **NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need: From b4056f78f17e2bc75ed55152564ff7148fbbe049 Mon Sep 17 00:00:00 2001 From: xpume <770954908@qq.com> Date: Mon, 28 Aug 2023 18:07:38 +0800 Subject: [PATCH 30/42] Fix Page Not Found error (#26768) Co-authored-by: Lunny Xiao --- installation/from-binary.zh-cn.md | 2 +- installation/from-source.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installation/from-binary.zh-cn.md b/installation/from-binary.zh-cn.md index a5f54756..a456aa28 100644 --- a/installation/from-binary.zh-cn.md +++ b/installation/from-binary.zh-cn.md @@ -117,7 +117,7 @@ chmod 770 /etc/gitea - 使用 `gitea generate secret` 创建 `SECRET_KEY` 和 `INTERNAL_TOKEN` - 提供所有必要的密钥 -详情参考 [命令行文档](/zh-cn/command-line/) 中有关 `gitea generate secret` 的内容。 +详情参考 [命令行文档](administration/command-line.md) 中有关 `gitea generate secret` 的内容。 ### 配置 Gitea 工作路径 diff --git a/installation/from-source.zh-cn.md b/installation/from-source.zh-cn.md index 40c04ace..3f13746f 100644 --- a/installation/from-source.zh-cn.md +++ b/installation/from-source.zh-cn.md @@ -52,7 +52,7 @@ git checkout v@version@ - `go` @minGoVersion@ 或以上版本, 详见[这里](https://golang.google.cn/doc/install) - `node` @minNodeVersion@ 或以上版本,并且安装 `npm`, 详见[这里](https://nodejs.org/zh-cn/download/) -- `make`, 详见[这里](/zh-cn/hacking-on-gitea/) +- `make`, 详见[这里](development/hacking-on-gitea.md) 各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/main/Makefile) 可以用来使编译过程更方便。 From 02d1dfcef919c7bddbf63ad43866ab639a99180f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 28 Aug 2023 19:58:16 +0800 Subject: [PATCH 31/42] Use docs.gitea.com instead of docs.gitea.io (#26769) backport #26739 --- administration/customizing-gitea.en-us.md | 12 ++++++------ administration/customizing-gitea.zh-cn.md | 6 +++--- administration/fail2ban-setup.en-us.md | 2 +- administration/fail2ban-setup.zh-cn.md | 2 +- administration/mail-templates.en-us.md | 4 ++-- administration/mail-templates.zh-cn.md | 4 ++-- administration/repo-indexer.en-us.md | 2 +- administration/repo-indexer.zh-cn.md | 2 +- development/api-usage.en-us.md | 4 ++-- development/api-usage.zh-cn.md | 2 +- development/oauth2-provider.en-us.md | 4 ++-- development/oauth2-provider.zh-cn.md | 2 +- development/oauth2-provider.zh-tw.md | 2 +- help/support.zh-tw.md | 2 +- installation/with-docker-rootless.en-us.md | 6 +++--- installation/with-docker-rootless.zh-cn.md | 4 ++-- installation/with-docker.en-us.md | 6 +++--- installation/with-docker.fr-fr.md | 2 +- installation/with-docker.zh-cn.md | 4 ++-- usage/actions/design.en-us.md | 2 +- usage/actions/design.zh-cn.md | 2 +- usage/actions/faq.en-us.md | 4 ++-- usage/actions/faq.zh-cn.md | 4 ++-- usage/authentication.en-us.md | 2 +- 24 files changed, 43 insertions(+), 43 deletions(-) diff --git a/administration/customizing-gitea.en-us.md b/administration/customizing-gitea.en-us.md index ae05ca45..66feaaf2 100644 --- a/administration/customizing-gitea.en-us.md +++ b/administration/customizing-gitea.en-us.md @@ -36,7 +36,7 @@ Application settings can be found in file `CustomConf` which is by default, Again `gitea help` will allow you review this variable and you can override it using the `--config` option on the `gitea` binary. -- [Quick Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) +- [Quick Cheat Sheet](administration/config-cheat-sheet.md) - [Complete List](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) If the `CustomPath` folder can't be found despite checking `gitea help`, check the `GITEA_CUSTOM` @@ -44,7 +44,7 @@ environment variable; this can be used to override the default path to something `GITEA_CUSTOM` might, for example, be set by an init script. You can check whether the value is set under the "Configuration" tab on the site administration page. -- [List of Environment Variables](https://docs.gitea.io/en-us/environment-variables/) +- [List of Environment Variables](administration/environment-variables.md) **Note:** Gitea must perform a full restart to see configuration changes. @@ -79,7 +79,7 @@ for C++ repositories, we want to replace `options/gitignore/C++`. To do this, a must be placed in `$GITEA_CUSTOM/options/gitignore/C++` (see about the location of the `CustomPath` 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/), +Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://pkg.go.dev/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](administration/cmd-embedded.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). @@ -103,7 +103,7 @@ just place it under your "$GITEA_CUSTOM/public/" directory (for instance `$GITEA To match the current style, the link should have the class name "item", and you can use `{{AppSubUrl}}` to get the base URL: `Impressum` -For more information, see [Adding Legal Pages](https://docs.gitea.io/en-us/adding-legal-pages). +For more information, see [Adding Legal Pages](administration/adding-legal-pages.md). You can add new tabs in the same way, putting them in `extra_tabs.tmpl`. The exact HTML needed to match the style of other tabs is in the file @@ -355,10 +355,10 @@ A full list of supported emoji's is at [emoji list](https://gitea.com/gitea/gite ## Customizing the look of Gitea The default built-in themes are `gitea` (light), `arc-green` (dark), and `auto` (chooses light or dark depending on operating system settings). -The default theme can be changed via `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini`. +The default theme can be changed via `DEFAULT_THEME` in the [ui](administration/config-cheat-sheet.md#ui-ui) section of `app.ini`. Gitea also has support for user themes, which means every user can select which theme should be used. -The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini`. +The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](administration/config-cheat-sheet.md#ui-ui) section of `app.ini`. To make a custom theme available to all users: diff --git a/administration/customizing-gitea.zh-cn.md b/administration/customizing-gitea.zh-cn.md index 77b2fd83..2babf03d 100644 --- a/administration/customizing-gitea.zh-cn.md +++ b/administration/customizing-gitea.zh-cn.md @@ -23,13 +23,13 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板 将会自动创建包括 `custom/` 在内的必要应用目录,应用本身的配置存放在 `custom/conf/app.ini` 当中。在发行版中可能会以 `/etc/gitea/` 的形式为 `custom` 设置一个符号链接,查看配置详情请移步: -- [快速备忘单](https://docs.gitea.io/en-us/config-cheat-sheet/) +- [快速备忘单](administration/config-cheat-sheet.md) - [完整配置清单](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) 如果您在 binary 同目录下无法找到 `custom` 文件夹,请检查您的 `GITEA_CUSTOM` 环境变量配置, 因为它可能被配置到了其他地方(可能被一些启动脚本设置指定了目录)。 -- [环境变量清单](https://docs.gitea.io/en-us/specific-variables/) +- [环境变量清单](administration/environment-variables.md) **注:** 必须完全重启 Gitea 以使配置生效。 @@ -87,4 +87,4 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板 ## 更改 Gitea 外观 Gitea 目前由两种内置主题,分别为默认 `gitea` 主题和深色主题 `arc-green`,您可以通过修改 -`app.ini` [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) 部分的 `DEFAULT_THEME` 的值来变更至一个可用的 Gitea 外观。 +`app.ini` [ui](administration/config-cheat-sheet.md#ui-ui) 部分的 `DEFAULT_THEME` 的值来变更至一个可用的 Gitea 外观。 diff --git a/administration/fail2ban-setup.en-us.md b/administration/fail2ban-setup.en-us.md index 5c0101ef..c90f88c8 100644 --- a/administration/fail2ban-setup.en-us.md +++ b/administration/fail2ban-setup.en-us.md @@ -119,7 +119,7 @@ proxy_set_header X-Real-IP $remote_addr; The security options in `app.ini` need to be adjusted to allow the interpretation of the headers as well as the list of IP addresses and networks that describe trusted proxy servers -(See the [configuration cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet/#security-security) for more information). +(See the [configuration cheat sheet](administration/config-cheat-sheet.md#security-security) for more information). ``` REVERSE_PROXY_LIMIT = 1 diff --git a/administration/fail2ban-setup.zh-cn.md b/administration/fail2ban-setup.zh-cn.md index 2ca0b3a7..457afba9 100644 --- a/administration/fail2ban-setup.zh-cn.md +++ b/administration/fail2ban-setup.zh-cn.md @@ -91,4 +91,4 @@ REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128 `REVERSE_PROXY_LIMIT` 限制反向代理服务器的层数,设置为 `0` 表示不使用这些标头。 `REVERSE_PROXY_TRUSTED_PROXIES` 表示受信任的反向代理服务器网络地址, 经过该网络地址转发来的流量会经过解析 `X-Real-IP` 头部得到真实客户端地址。 -(参考 [configuration cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet/#security-security)) +(参考 [configuration cheat sheet](administration/config-cheat-sheet.md#security-security)) diff --git a/administration/mail-templates.en-us.md b/administration/mail-templates.en-us.md index d66108f2..a129453e 100644 --- a/administration/mail-templates.en-us.md +++ b/administration/mail-templates.en-us.md @@ -18,7 +18,7 @@ menu: # Mail templates To craft the e-mail subject and contents for certain operations, Gitea can be customized by using templates. The templates -for these functions are located under the [`custom` directory](https://docs.gitea.io/en-us/customizing-gitea/). +for these functions are located under the [`custom` directory](administration/customizing-gitea.md). Gitea has an internal template that serves as default in case there's no custom alternative. Custom templates are loaded when Gitea starts. Changes made to them are not recognized until Gitea is restarted again. @@ -165,7 +165,7 @@ If the template fails to render, it will be noticed only at the moment the mail A default subject is used if the subject template fails, and whatever was rendered successfully from the the _mail body_ is used, disregarding the rest. -Please check [Gitea's logs](https://docs.gitea.io/en-us/logging-configuration/) for error messages in case of trouble. +Please check [Gitea's logs](administration/logging-config.md) for error messages in case of trouble. ## Example diff --git a/administration/mail-templates.zh-cn.md b/administration/mail-templates.zh-cn.md index 49f8b977..6a31d65b 100644 --- a/administration/mail-templates.zh-cn.md +++ b/administration/mail-templates.zh-cn.md @@ -17,7 +17,7 @@ menu: # 邮件模板 -为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](https://docs.gitea.io/en-us/customizing-gitea/) 下。 +为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](administration/customizing-gitea.md) 下。 如果没有自定义的替代方案,Gitea 将使用内部模板作为默认模板。 自定义模板在 Gitea 启动时加载。对它们的更改在 Gitea 重新启动之前不会被识别。 @@ -148,7 +148,7 @@ _主题_ 和 _邮件正文_ 由 [Golang的模板引擎](https://golang.org/pkg/t 如果模板无法呈现,则只有在发送邮件时才会注意到。 如果主题模板失败,将使用默认主题,如果从 _邮件正文_ 中成功呈现了任何内容,则将使用该内容,忽略其他内容。 -如果遇到问题,请检查 [Gitea的日志](https://docs.gitea.io/en-us/logging-configuration/) 以获取错误消息。 +如果遇到问题,请检查 [Gitea的日志](administration/logging-config.md) 以获取错误消息。 ## 示例 diff --git a/administration/repo-indexer.en-us.md b/administration/repo-indexer.en-us.md index 71eb4ffb..6dec2d63 100644 --- a/administration/repo-indexer.en-us.md +++ b/administration/repo-indexer.en-us.md @@ -19,7 +19,7 @@ menu: ## Setting up the repository indexer -Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/): +Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](administration/config-cheat-sheet.md): ```ini [indexer] diff --git a/administration/repo-indexer.zh-cn.md b/administration/repo-indexer.zh-cn.md index 157bfd97..d70a617a 100644 --- a/administration/repo-indexer.zh-cn.md +++ b/administration/repo-indexer.zh-cn.md @@ -19,7 +19,7 @@ menu: ## 设置仓库索引器 -通过在您的 [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/) 中启用此功能,Gitea 可以通过仓库的文件进行搜索: +通过在您的 [`app.ini`](administration/config-cheat-sheet.md) 中启用此功能,Gitea 可以通过仓库的文件进行搜索: ```ini [indexer] diff --git a/development/api-usage.en-us.md b/development/api-usage.en-us.md index a49c145b..465f4d38 100644 --- a/development/api-usage.en-us.md +++ b/development/api-usage.en-us.md @@ -21,7 +21,7 @@ menu: By default, `ENABLE_SWAGGER` is true, and `MAX_RESPONSE_ITEMS` is set to 50. See [Config Cheat -Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) for more +Sheet](administration/config-cheat-sheet.md) for more information. ## Authentication @@ -76,7 +76,7 @@ interface: `Settings | Applications | Generate New Token`. ## OAuth2 Provider -Access tokens obtained from Gitea's [OAuth2 provider](https://docs.gitea.io/en-us/oauth2-provider) are accepted by these methods: +Access tokens obtained from Gitea's [OAuth2 provider](development/oauth2-provider.md) are accepted by these methods: - `Authorization bearer ...` header in HTTP headers - `token=...` parameter in URL query string diff --git a/development/api-usage.zh-cn.md b/development/api-usage.zh-cn.md index ca5909e5..c7eeceeb 100644 --- a/development/api-usage.zh-cn.md +++ b/development/api-usage.zh-cn.md @@ -20,7 +20,7 @@ menu: ## 开启/配置 API 访问 通常情况下, `ENABLE_SWAGGER` 默认开启并且参数 `MAX_RESPONSE_ITEMS` 默认为 50。您可以从 [Config Cheat -Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) 中获取更多配置相关信息。 +Sheet](administration/config-cheat-sheet.md) 中获取更多配置相关信息。 ## 通过 API 认证 diff --git a/development/oauth2-provider.en-us.md b/development/oauth2-provider.en-us.md index b3824f4b..d1d8252c 100644 --- a/development/oauth2-provider.en-us.md +++ b/development/oauth2-provider.en-us.md @@ -137,7 +137,7 @@ For public clients, a redirect URI of a loopback IP address such as `http://127. The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request. -3. Use the `access_token` to make [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) to access the user's resources. +3. Use the `access_token` to make [API requests](development/api-usage.md#oauth2-provider) to access the user's resources. ### Public client (PKCE) @@ -199,4 +199,4 @@ After you have generated this values, you can continue with your request. The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request. -3. Use the `access_token` to make [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) to access the user's resources. +3. Use the `access_token` to make [API requests](development/api-usage.md#oauth2-provider) to access the user's resources. diff --git a/development/oauth2-provider.zh-cn.md b/development/oauth2-provider.zh-cn.md index 6584bac3..80d84694 100644 --- a/development/oauth2-provider.zh-cn.md +++ b/development/oauth2-provider.zh-cn.md @@ -134,4 +134,4 @@ Gitea 支持私密和公共客户端类型,[参见 RFC 6749](https://datatrack `access_token` 请求中的 `REDIRECT_URI` 必须与 `authorize` 请求中的 `REDIRECT_URI` 相符。 -3. 使用 `access_token` 来构造 [API 请求](https://docs.gitea.io/en-us/api-usage#oauth2) 以读写用户的资源。 +3. 使用 `access_token` 来构造 [API 请求](development/api-usage.md#oauth2-provider) 以读写用户的资源。 diff --git a/development/oauth2-provider.zh-tw.md b/development/oauth2-provider.zh-tw.md index dac6e684..dd9f04f0 100644 --- a/development/oauth2-provider.zh-tw.md +++ b/development/oauth2-provider.zh-tw.md @@ -93,4 +93,4 @@ Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意 `access_token` 請求中的 `REDIRECT_URI` 必須符合 `authorize` 請求中的 `REDIRECT_URI`。 -1. 發送 [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) 時使用 `access_token` 以存取使用者的資源。 +1. 發送 [API requests](development/api-usage.md#oauth2-provider) 時使用 `access_token` 以存取使用者的資源。 diff --git a/help/support.zh-tw.md b/help/support.zh-tw.md index 70f4db01..511b3624 100644 --- a/help/support.zh-tw.md +++ b/help/support.zh-tw.md @@ -28,7 +28,7 @@ menu: 3. 您看到的任何錯誤訊息 4. 儘可能地在 [try.gitea.io](https://try.gitea.io) 觸發您的問題並記下步驟,以便其他人能重現那個問題。 - 這將讓我們更有機會快速地找出問題的根源並解決它。 -5. 堆棧跟踪,[請參考英文文檔](https://docs.gitea.io/en-us/seek-help/) +5. 堆棧跟踪,[請參考英文文檔](https://docs.gitea.com/help/support) ## 錯誤回報 diff --git a/installation/with-docker-rootless.en-us.md b/installation/with-docker-rootless.en-us.md index fc99819d..10f12122 100644 --- a/installation/with-docker-rootless.en-us.md +++ b/installation/with-docker-rootless.en-us.md @@ -254,7 +254,7 @@ documented above, please note that `db` must be used as the database hostname. # Customization -Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should +Customization files described [here](administration/customizing-gitea.md) should be placed in `/var/lib/gitea/custom` directory. If using host volumes, it's quite easy to access these files; for named volumes, this is done through another container or by direct access at `/var/lib/docker/volumes/gitea_gitea/_/var_lib_gitea`. The configuration file will be saved at @@ -313,7 +313,7 @@ services: - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` -To set required TOKEN and SECRET values, consider using Gitea's built-in [generate utility functions](https://docs.gitea.io/en-us/command-line/#generate). +To set required TOKEN and SECRET values, consider using Gitea's built-in [generate utility functions](administration/command-line.md#generate). # SSH Container Passthrough @@ -342,7 +342,7 @@ Once the wrapper is in place, you can make it the shell for the `git` user: sudo usermod -s /usr/local/bin/gitea-shell git ``` -Now that all the SSH commands are forwarded to the container, you need to set up the SSH authentication on the host. This is done by leveraging the [SSH AuthorizedKeysCommand](https://docs.gitea.io/en-us/command-line/#keys) to match the keys against those accepted by Gitea. Add the following block to `/etc/ssh/sshd_config`, on the host: +Now that all the SSH commands are forwarded to the container, you need to set up the SSH authentication on the host. This is done by leveraging the [SSH AuthorizedKeysCommand](administration/command-line.md#keys) to match the keys against those accepted by Gitea. Add the following block to `/etc/ssh/sshd_config`, on the host: ```bash Match User git diff --git a/installation/with-docker-rootless.zh-cn.md b/installation/with-docker-rootless.zh-cn.md index 9d5013ea..70bc32dc 100644 --- a/installation/with-docker-rootless.zh-cn.md +++ b/installation/with-docker-rootless.zh-cn.md @@ -281,7 +281,7 @@ services: - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` -要设置所需的 TOKEN 和 SECRET 值,可以使用 Gitea 的内置[生成使用函数](https://docs.gitea.io/en-us/command-line/#generate). +要设置所需的 TOKEN 和 SECRET 值,可以使用 Gitea 的内置[生成使用函数](administration/command-line.md#generate). # SSH 容器透传 @@ -310,7 +310,7 @@ sudo chmod +x /usr/local/bin/gitea-shell sudo usermod -s /usr/local/bin/gitea-shell git ``` -现在,所有的 SSH 命令都会被转发到容器,您需要在主机上设置 SSH 认证。这可以通过利用 [SSH AuthorizedKeysCommand](https://docs.gitea.io/en-us/command-line/#keys) 来匹配 Gitea 接受的密钥。在主机的 `/etc/ssh/sshd_config` 文件中添加以下代码块: +现在,所有的 SSH 命令都会被转发到容器,您需要在主机上设置 SSH 认证。这可以通过利用 [SSH AuthorizedKeysCommand](administration/command-line.md#keys) 来匹配 Gitea 接受的密钥。在主机的 `/etc/ssh/sshd_config` 文件中添加以下代码块: ```bash Match User git diff --git a/installation/with-docker.en-us.md b/installation/with-docker.en-us.md index f5a09e9f..e67f5bcc 100644 --- a/installation/with-docker.en-us.md +++ b/installation/with-docker.en-us.md @@ -261,7 +261,7 @@ documented above, please note that `db` must be used as the database hostname. ## Customization -Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should +Customization files described [here](administration/customizing-gitea.md) should be placed in `/data/gitea` directory. If using host volumes, it's quite easy to access these files; for named volumes, this is done through another container or by direct access at `/var/lib/docker/volumes/gitea_gitea/_data`. The configuration file will be saved at @@ -309,7 +309,7 @@ services: - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` -Gitea will generate new secrets/tokens for every new installation automatically and write them into the app.ini. If you want to set the secrets/tokens manually, you can use the following docker commands to use of Gitea's built-in [generate utility functions](https://docs.gitea.io/en-us/command-line/#generate). Do not lose/change your SECRET_KEY after the installation, otherwise the encrypted data can not be decrypted anymore. +Gitea will generate new secrets/tokens for every new installation automatically and write them into the app.ini. If you want to set the secrets/tokens manually, you can use the following docker commands to use of Gitea's built-in [generate utility functions](administration/command-line.md#generate). Do not lose/change your SECRET_KEY after the installation, otherwise the encrypted data can not be decrypted anymore. The following commands will output a new `SECRET_KEY` and `INTERNAL_TOKEN` to `stdout`, which you can then place in your environment variables. @@ -553,7 +553,7 @@ In this option, the idea is that the host SSH uses an `AuthorizedKeysCommand` in Now all attempts to login as the `git` user on the host will be forwarded to the docker - including the `SSH_ORIGINAL_COMMAND`. We now need to set-up SSH authentication on the host. -We will do this by leveraging the [SSH AuthorizedKeysCommand](https://docs.gitea.io/en-us/command-line/#keys) to match the keys against those accepted by Gitea. +We will do this by leveraging the [SSH AuthorizedKeysCommand](administration/command-line.md#keys) to match the keys against those accepted by Gitea. Add the following block to `/etc/ssh/sshd_config`, on the host: diff --git a/installation/with-docker.fr-fr.md b/installation/with-docker.fr-fr.md index 432add9a..46b562e1 100644 --- a/installation/with-docker.fr-fr.md +++ b/installation/with-docker.fr-fr.md @@ -103,7 +103,7 @@ Vous devriez maintenant avoir deux conteneurs Docker pour Gitea et PostgreSQL pl # Personnalisation -Les fichier personnalisés ([voir les instructions](https://docs.gitea.io/en-us/customizing-gitea/)) peuvent être placés dans le répertoire `/data/gitea`. +Les fichier personnalisés ([voir les instructions](administration/customizing-gitea.md)) peuvent être placés dans le répertoire `/data/gitea`. Le fichier de configuration sera sauvegardé à l'emplacement suivant : `/data/gitea/conf/app.ini` diff --git a/installation/with-docker.zh-cn.md b/installation/with-docker.zh-cn.md index d8cbc2f9..fcaff1c1 100644 --- a/installation/with-docker.zh-cn.md +++ b/installation/with-docker.zh-cn.md @@ -260,7 +260,7 @@ MySQL 或 PostgreSQL 容器将需要分别创建。 ## 自定义 -[此处](https://docs.gitea.io/zh-cn/customizing-gitea/)描述的定制文件应放在 `/data/gitea` 目录中。如果使用主机卷,则访问这些文件非常容易;对于命名卷,可以通过另一个容器或通过直接访问 `/var/lib/docker/volumes/gitea_gitea/_data` 来完成。安装后,配置文件将保存在 `/data/gitea/conf/app.ini` 中。 +[此处](administration/customizing-gitea.md)描述的定制文件应放在 `/data/gitea` 目录中。如果使用主机卷,则访问这些文件非常容易;对于命名卷,可以通过另一个容器或通过直接访问 `/var/lib/docker/volumes/gitea_gitea/_data` 来完成。安装后,配置文件将保存在 `/data/gitea/conf/app.ini` 中。 ## 升级 @@ -293,7 +293,7 @@ services: - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` -Gitea 将为每次新安装自动生成新的 `SECRET_KEY` 并将它们写入 `app.ini`。 如果您想手动设置 `SECRET_KEY`,您可以使用以下 docker 命令来使用 Gitea 内置的[方法](https://docs.gitea.io/en-us/command-line/#generate)生成 `SECRET_KEY`。 安装后请妥善保管您的 `SECRET_KEY`,如若丢失则无法解密已加密的数据。 +Gitea 将为每次新安装自动生成新的 `SECRET_KEY` 并将它们写入 `app.ini`。 如果您想手动设置 `SECRET_KEY`,您可以使用以下 docker 命令来使用 Gitea 内置的[方法](administration/command-line.md#generate)生成 `SECRET_KEY`。 安装后请妥善保管您的 `SECRET_KEY`,如若丢失则无法解密已加密的数据。 以下命令将向 `stdout` 输出一个新的 `SECRET_KEY` 和 `INTERNAL_TOKEN`,然后您可以将其放入环境变量中。 diff --git a/usage/actions/design.en-us.md b/usage/actions/design.en-us.md index d4c90d54..8394e822 100644 --- a/usage/actions/design.en-us.md +++ b/usage/actions/design.en-us.md @@ -112,7 +112,7 @@ You can configure your Gitea instance to fetch actions or images from your intra In fact, your Gitea instance can serve as both the actions marketplace and the image registry. You can mirror actions repositories from GitHub to your Gitea instance, and use them as normal. -And [Gitea Container Registry](https://docs.gitea.io/en-us/usage/packages/container/) can be used as a Docker image registry. +And [Gitea Container Registry](usage/packages/container.md) can be used as a Docker image registry. ### Connection 4, job containers to internet diff --git a/usage/actions/design.zh-cn.md b/usage/actions/design.zh-cn.md index 995e9f0b..06f600f3 100644 --- a/usage/actions/design.zh-cn.md +++ b/usage/actions/design.zh-cn.md @@ -113,7 +113,7 @@ act runner 必须能够连接到Gitea以接收任务并发送执行结果回来 实际上,您的Gitea实例可以同时充当 Actions 市场和镜像注册表。 您可以将GitHub上的Actions仓库镜像到您的Gitea实例,并将其用作普通Actions。 -而 [Gitea 容器注册表](https://docs.gitea.io/en-us/usage/packages/container/) 可用作Docker镜像注册表。 +而 [Gitea 容器注册表](usage/packages/container.md) 可用作Docker镜像注册表。 ### 连接 4,Job容器到互联网 diff --git a/usage/actions/faq.en-us.md b/usage/actions/faq.en-us.md index d665b05b..031509a0 100644 --- a/usage/actions/faq.en-us.md +++ b/usage/actions/faq.en-us.md @@ -61,7 +61,7 @@ For example: Be careful, the `https://` or `http://` prefix is necessary! Alternatively, if you want your runners to download actions from GitHub or your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`. -See [Configuration Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions). +See [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions). This is one of the differences from GitHub Actions, but it should allow users much more flexibility in how they run Actions. @@ -69,7 +69,7 @@ This is one of the differences from GitHub Actions, but it should allow users mu Runners have no more permissions than simply connecting to your Gitea instance. When any runner receives a job to run, it will temporarily gain limited permission to the repository associated with the job. -If you want to give more permissions to the runner, allowing it to access more private repositories or external systems, you can pass [secrets](https://docs.gitea.io/en-us/usage/secrets/) to it. +If you want to give more permissions to the runner, allowing it to access more private repositories or external systems, you can pass [secrets](usage/secrets.md) to it. Refined permission control to Actions is a complicated job. In the future, we will add more options to Gitea to make it more configurable, such as allowing more write access to repositories or read access to all repositories in the same organization. diff --git a/usage/actions/faq.zh-cn.md b/usage/actions/faq.zh-cn.md index cdfea6d1..f5dc8e17 100644 --- a/usage/actions/faq.zh-cn.md +++ b/usage/actions/faq.zh-cn.md @@ -61,7 +61,7 @@ DEFAULT_REPO_UNITS = ...,repo.actions 注意,`https://`或`http://`前缀是必需的! 另外,如果您希望您的Runner默认从GitHub或您自己的Gitea实例下载Actions,可以通过设置 `[actions].DEFAULT_ACTIONS_URL`进行配置。 -参见[配置速查表](https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions)。 +参见[配置速查表](administration/config-cheat-sheet.md#actions-actions)。 这是与GitHub Actions的一个区别,但它应该允许用户以更灵活的方式运行Actions。 @@ -69,7 +69,7 @@ DEFAULT_REPO_UNITS = ...,repo.actions Runner仅具有连接到您的Gitea实例的权限。 当任何Runner接收到要运行的Job时,它将临时获得与Job关联的仓库的有限权限。 -如果您想为Runner提供更多权限,允许它访问更多私有仓库或外部系统,您可以向其传递[密钥](https://docs.gitea.io/en-us/usage/secrets/)。 +如果您想为Runner提供更多权限,允许它访问更多私有仓库或外部系统,您可以向其传递[密钥](usage/secrets.md)。 对于 Actions 的细粒度权限控制是一项复杂的工作。 在未来,我们将添加更多选项以使Gitea更可配置,例如允许对仓库进行更多写访问或对同一组织中的所有仓库进行读访问。 diff --git a/usage/authentication.en-us.md b/usage/authentication.en-us.md index d3664142..4ab5cad3 100644 --- a/usage/authentication.en-us.md +++ b/usage/authentication.en-us.md @@ -197,7 +197,7 @@ administrative user. field is set to `mail.com`, then Gitea will expect the `user email` field for an authenticated GIT instance to be `gituser@mail.com`.[^2] -**Note**: PAM support is added via [build-time flags](https://docs.gitea.io/en-us/install-from-source/#build), +**Note**: PAM support is added via [build-time flags](installation/install-from-source.md#build), and the official binaries provided do not have this enabled. PAM requires that the necessary libpam dynamic library be available and the necessary PAM development headers be accessible to the compiler. From bdb6828282de964dcf3d099019eaea1bdb8b67ec Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 29 Aug 2023 07:57:21 +0800 Subject: [PATCH 32/42] Improve the "bug report" template and "support options" document (#26753) (#26780) Backport #26753 by @wxiaoguang * `/help/support` is a better document than `/administration/logging-config` for bug reporting * Improve `support.en-us.md` * Move/add detailed contents into `Advanced Bug Report Tips` section * Merge `Chinese Support` section into `Support Options` Co-authored-by: wxiaoguang --- help/support.en-us.md | 67 +++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/help/support.en-us.md b/help/support.en-us.md index 24afe67b..db735b81 100644 --- a/help/support.en-us.md +++ b/help/support.en-us.md @@ -22,34 +22,57 @@ menu: - [Discourse Forum](https://discourse.gitea.io/) - [Matrix](https://matrix.to/#/#gitea-space:matrix.org) - NOTE: Most of the Matrix channels are bridged with their counterpart in Discord and may experience some degree of flakiness with the bridge process. +- Chinese Support + - [Discourse Chinese Category](https://discourse.gitea.io/c/5-category/5) + - QQ Group 328432459 + +# Bug Report + +If you found a bug, please [create an issue on GitHub](https://github.com/go-gitea/gitea/issues). **NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need: 1. Your `app.ini` (with any sensitive data scrubbed as necessary). -2. The Gitea logs, and any other appropriate log files for the situation. - - When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs. - - When using docker, use `docker logs --tail 1000 ` to collect logs. - - By default, the logs are outputted to console. If you need to collect logs from files, - you could copy the following config into your `app.ini` (remove all other `[log]` sections), - then you can find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`). - - ```ini - ; To show all SQL logs, you can also set LOG_SQL=true in the [database] section - [log] - LEVEL=debug - MODE=console,file - ``` - -3. Any error messages you are seeing. -4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue. - - This will greatly improve the chance that the root of the issue can be quickly discovered and resolved. -5. If you encounter slow/hanging/deadlock problems, please report the stack trace when the problem occurs. +2. Any error messages you are seeing. +3. The Gitea logs, and all other related logs for the situation. + - It's more useful to collect `trace` / `debug` level logs (see the next section). + - When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs. + - When using docker, use `docker logs --tail 1000 ` to collect logs. +4. Reproducible steps so that others could reproduce and understand the problem more quickly and easily. + - [try.gitea.io](https://try.gitea.io) could be used to reproduce the problem. +5. If you encounter slow/hanging/deadlock problems, please report the stacktrace when the problem occurs. Go to the "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report". -## Bugs +# Advanced Bug Report Tips -If you found a bug, please create an [issue on GitHub](https://github.com/go-gitea/gitea/issues). +## More Config Options for Logs -## Chinese Support +By default, the logs are outputted to console with `info` level. +If you need to set log level and/or collect logs from files, +you could just copy the following config into your `app.ini` (remove all other `[log]` sections), +then you will find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`). -Support for the Chinese language is provided at [Our discourse](https://discourse.gitea.io/c/5-category/5) or QQ Group 328432459. +```ini +; To show all SQL logs, you can also set LOG_SQL=true in the [database] section +[log] +LEVEL=debug +MODE=console,file +``` + +## Collecting Stacktrace by Command Line + +Gitea could use Golang's pprof handler and toolchain to collect stacktrace and other runtime information. + +If the web UI stops working, you could try to collect the stacktrace by command line: + +1. Set `app.ini`: + + ``` + [server] + ENABLE_PPROF = true + ``` + +2. Restart Gitea + +3. Try to trigger the bug, when the requests get stuck for a while, + use `curl` or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` to get the stacktrace. From e9b0c95116bb287fda90d714b1002d17b7982915 Mon Sep 17 00:00:00 2001 From: CaiCandong <50507092+CaiCandong@users.noreply.github.com> Date: Mon, 4 Sep 2023 02:45:37 +0800 Subject: [PATCH 33/42] Update docs about attachment path (#26883) (#26884) Backport #26883 This change was caused by #26271, for configuration as below: ``` [attachment] ENABLE = true PATH = data/attachments MAX_SIZE = 100 MAX_FILES = 5 ``` Before #26271, the resolved path is ${AppWorkPath}/${attachments.PATH} (such as `/var/lib/gitea/data/attachments`) After #26271, the resolved path is ${AppDataPath}/${attachments.PATH} (such as `/var/lib/gitea/data/data/attachments`) Fix https://github.com/go-gitea/gitea/issues/26864 Follow https://github.com/go-gitea/gitea/pull/26271 --- administration/config-cheat-sheet.en-us.md | 2 +- administration/config-cheat-sheet.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index f1b70337..ff0a3319 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -818,7 +818,7 @@ Default templates for project boards: - `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once. - `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]` - `SERVE_DIRECT`: **false**: Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing. -- `PATH`: **data/attachments**: Path to store attachments only available when STORAGE_TYPE is `local` +- `PATH`: **attachments**: Path to store attachments only available when STORAGE_TYPE is `local`, relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`. - `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when STORAGE_TYPE is `minio` - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` diff --git a/administration/config-cheat-sheet.zh-cn.md b/administration/config-cheat-sheet.zh-cn.md index a2fa25df..e9877c44 100644 --- a/administration/config-cheat-sheet.zh-cn.md +++ b/administration/config-cheat-sheet.zh-cn.md @@ -230,7 +230,7 @@ menu: - `MAX_SIZE`: 附件最大限制,单位 MB,比如: `4`。 - `MAX_FILES`: 一次最多上传的附件数量,比如: `5`。 - `STORAGE_TYPE`: **local**: 附件存储类型,`local` 将存储到本地文件夹, `minio` 将存储到 s3 兼容的对象存储服务中。 -- `PATH`: **data/attachments**: 附件存储路径,仅当 `STORAGE_TYPE` 为 `local` 时有效。 +- `PATH`: **attachments**: 存储附件的路径,仅当 STORAGE_TYPE 为 `local` 时可用。如果是相对路径,将会被解析为 `${AppDataPath}/${attachment.PATH}`. - `MINIO_ENDPOINT`: **localhost:9000**: Minio 终端,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID ,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 From 6df1396468f0e835cd5ef36a28faf75e47a0669c Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 4 Sep 2023 03:37:42 +0800 Subject: [PATCH 34/42] Update documents to fix some links (#26885) (#26888) Backport #26885 by @lunny Co-authored-by: Lunny Xiao --- administration/external-renderers.en-us.md | 2 +- administration/https-support.en-us.md | 6 +++--- administration/https-support.zh-cn.md | 4 ++-- usage/labels.zh-cn.md | 2 +- usage/linked-references.en-us.md | 2 +- usage/linked-references.zh-cn.md | 2 +- usage/multi-factor-authentication.en-us.md | 2 +- usage/pull-request.en-us.md | 2 +- usage/pull-request.zh-cn.md | 2 +- usage/pull-request.zh-tw.md | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/administration/external-renderers.en-us.md b/administration/external-renderers.en-us.md index 66941980..b593a154 100644 --- a/administration/external-renderers.en-us.md +++ b/administration/external-renderers.en-us.md @@ -24,7 +24,7 @@ it is just a matter of: - add some configuration to your `app.ini` file - restart your Gitea instance -This supports rendering of whole files. If you want to render code blocks in markdown you would need to do something with javascript. See some examples on the [Customizing Gitea](../customizing-gitea) page. +This supports rendering of whole files. If you want to render code blocks in markdown you would need to do something with javascript. See some examples on the [Customizing Gitea](administration/customizing-gitea.md) page. ## Installing external binaries diff --git a/administration/https-support.en-us.md b/administration/https-support.en-us.md index 6441663c..4e18722d 100644 --- a/administration/https-support.en-us.md +++ b/administration/https-support.en-us.md @@ -36,7 +36,7 @@ KEY_FILE = key.pem ``` Note that if your certificate is signed by a third party certificate authority (i.e. not self-signed), then cert.pem should contain the certificate chain. The server certificate must be the first entry in cert.pem, followed by the intermediaries in order (if any). The root certificate does not have to be included because the connecting client must already have it in order to estalbish the trust relationship. -To learn more about the config values, please checkout the [Config Cheat Sheet](../config-cheat-sheet#server-server). +To learn more about the config values, please checkout the [Config Cheat Sheet](administration/config-cheat-sheet.md#server-server). For the `CERT_FILE` or `KEY_FILE` field, the file path is relative to the `GITEA_CUSTOM` environment variable when it is a relative path. It can be an absolute path as well. @@ -85,11 +85,11 @@ ACME_DIRECTORY=https ACME_EMAIL=email@example.com ``` -To learn more about the config values, please checkout the [Config Cheat Sheet](../config-cheat-sheet#server-server). +To learn more about the config values, please checkout the [Config Cheat Sheet](administration/config-cheat-sheet.md#server-server). ## Using a reverse proxy -Setup up your reverse proxy as shown in the [reverse proxy guide](../reverse-proxies). +Setup up your reverse proxy as shown in the [reverse proxy guide](administration/reverse-proxies.md). After that, enable HTTPS by following one of these guides: diff --git a/administration/https-support.zh-cn.md b/administration/https-support.zh-cn.md index 124242f7..add7906c 100644 --- a/administration/https-support.zh-cn.md +++ b/administration/https-support.zh-cn.md @@ -82,11 +82,11 @@ ACME_DIRECTORY=https ACME_EMAIL=email@example.com ``` -要了解关于配置, 请访问 [配置备忘单](../config-cheat-sheet#server-server)获取更多信息 +要了解关于配置, 请访问 [配置备忘单](administration/config-cheat-sheet.md#server-server)获取更多信息 ## 使用反向代理服务器 -按照 [reverse proxy guide](../reverse-proxies) 的规则设置你的反向代理服务器 +按照 [reverse proxy guide](administration/reverse-proxies.md) 的规则设置你的反向代理服务器 然后,按照下面的向导启用 HTTPS: diff --git a/usage/labels.zh-cn.md b/usage/labels.zh-cn.md index 27c7d84f..b9cf3930 100644 --- a/usage/labels.zh-cn.md +++ b/usage/labels.zh-cn.md @@ -27,7 +27,7 @@ menu: 标签具有必填的名称和颜色,可选的描述,以及必须是独占的或非独占的(见下面的“作用域标签”)。 -当您创建一个仓库时,可以通过使用 `工单标签(Issue Labels)` 选项来选择标签集。该选项列出了一些在您的实例上 [全局配置的可用标签集](../administration/customizing-gitea/#labels)。在创建仓库时,这些标签也将被创建。 +当您创建一个仓库时,可以通过使用 `工单标签(Issue Labels)` 选项来选择标签集。该选项列出了一些在您的实例上 [全局配置的可用标签集](administration/customizing-gitea.md#labels)。在创建仓库时,这些标签也将被创建。 ## 作用域标签 diff --git a/usage/linked-references.en-us.md b/usage/linked-references.en-us.md index a05a07a9..a0acb024 100644 --- a/usage/linked-references.en-us.md +++ b/usage/linked-references.en-us.md @@ -94,7 +94,7 @@ Sometimes a commit or pull request may fix or bring back a problem documented in a particular issue. Gitea supports closing and reopening the referenced issues by preceding the reference with a particular _keyword_. Common keywords include "closes", "fixes", "reopens", etc. This list can be -[customized]({{< ref "doc/administration/config-cheat-sheet.en-us.md" >}}) by the +[customized](administration/config-cheat-sheet.md) by the site administrator. Example: diff --git a/usage/linked-references.zh-cn.md b/usage/linked-references.zh-cn.md index 3cc8dca0..4d63d754 100644 --- a/usage/linked-references.zh-cn.md +++ b/usage/linked-references.zh-cn.md @@ -66,7 +66,7 @@ menu: ## 可操作的引用在合并请求和提交消息中 -有时,一个提交或合并请求可能会修复或重新出现在某个特定工单中。Gitea 支持在引用之前加上特定的“关键字”来关闭和重新打开被引用的工单。常见的关键字包括“closes”、“fixes”、“reopens”等。这个列表可以由站点管理员进行 [自定义]({{< ref "doc/administration/config-cheat-sheet.zh-cn.md" >}})。 +有时,一个提交或合并请求可能会修复或重新出现在某个特定工单中。Gitea 支持在引用之前加上特定的“关键字”来关闭和重新打开被引用的工单。常见的关键字包括“closes”、“fixes”、“reopens”等。这个列表可以由站点管理员进行 [自定义](administration/config-cheat-sheet.md)。 示例: diff --git a/usage/multi-factor-authentication.en-us.md b/usage/multi-factor-authentication.en-us.md index 16b57b7b..30323f6d 100644 --- a/usage/multi-factor-authentication.en-us.md +++ b/usage/multi-factor-authentication.en-us.md @@ -1,6 +1,6 @@ --- date: "2023-08-22T14:21:00+08:00" -title: "Usage: Multi-factor Authentication (MFA)" +title: "Multi-factor Authentication (MFA)" slug: "multi-factor-authentication" weight: 15 toc: false diff --git a/usage/pull-request.en-us.md b/usage/pull-request.en-us.md index 8c94ee68..0176d0af 100644 --- a/usage/pull-request.en-us.md +++ b/usage/pull-request.en-us.md @@ -66,4 +66,4 @@ The first value of the list will be used in helpers. ## Pull Request Templates -You can find more information about pull request templates at the page [Issue and Pull Request templates](issue-pull-request-templates). +You can find more information about pull request templates at the page [Issue and Pull Request templates](usage/issue-pull-request-templates.md). diff --git a/usage/pull-request.zh-cn.md b/usage/pull-request.zh-cn.md index db5646f3..757bed28 100644 --- a/usage/pull-request.zh-cn.md +++ b/usage/pull-request.zh-cn.md @@ -30,4 +30,4 @@ WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP] ## 合并请求模板 -有关合并请求模板的更多信息请您移步 : [工单与合并请求模板](issue-pull-request-templates) +有关合并请求模板的更多信息请您移步 : [工单与合并请求模板](usage/issue-pull-request-templates.md) diff --git a/usage/pull-request.zh-tw.md b/usage/pull-request.zh-tw.md index 14d1b495..aeb5df52 100644 --- a/usage/pull-request.zh-tw.md +++ b/usage/pull-request.zh-tw.md @@ -31,4 +31,4 @@ WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP] ## 合併請求範本 -您可以在[問題與合併請求範本](issue-pull-request-templates)找到更多關於合併請求範本的資訊。 +您可以在[問題與合併請求範本](usage/issue-pull-request-templates.md)找到更多關於合併請求範本的資訊。 From e5bf9e041cd689afcd9196ce5d85c1654f95a362 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Tue, 5 Sep 2023 22:41:10 -0400 Subject: [PATCH 35/42] Improve LDAP group config documentation (#21227) (#26921) backport #21227 author @svenseeberg Co-authored-by: Sven Seeberg Co-authored-by: Giteabot --- usage/authentication.en-us.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usage/authentication.en-us.md b/usage/authentication.en-us.md index 4ab5cad3..6e4ede0b 100644 --- a/usage/authentication.en-us.md +++ b/usage/authentication.en-us.md @@ -157,12 +157,13 @@ Uses the following fields: - User Attribute in Group (optional) - - Which user LDAP attribute is listed in the group. - - Example: `uid` + - The user attribute that is used to reference a user in the group object. + - Example: `uid` if the group objects contains a `member: bender` and the user object contains a `uid: bender`. + - Example: `dn` if the group object contains a `member: uid=bender,ou=users,dc=planetexpress,dc=com`. - Group Attribute for User (optional) - - Which group LDAP attribute contains an array above user attribute names. - - Example: `memberUid` + - The attribute of the group object that lists/contains the group members. + - Example: `memberUid` or `member` ## PAM (Pluggable Authentication Module) From f6ca45afbb5f29634f4b0152812aafbd2c7a66d6 Mon Sep 17 00:00:00 2001 From: Infinoid Date: Sun, 10 Sep 2023 21:43:42 -0400 Subject: [PATCH 36/42] Correct the database.LOG_SQL default value in config cheat sheet (#26997) (#27002) This is a manual backport of #26997 to v1.20. --- administration/config-cheat-sheet.en-us.md | 2 +- administration/config-cheat-sheet.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index ff0a3319..3443d520 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -443,7 +443,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `ITERATE_BUFFER_SIZE`: **50**: Internal buffer size for iterating. - `CHARSET`: **utf8mb4**: For MySQL only, either "utf8" or "utf8mb4". NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this. - `PATH`: **data/gitea.db**: For SQLite3 only, the database file path. -- `LOG_SQL`: **true**: Log the executed SQL. +- `LOG_SQL`: **false**: Log the executed SQL. - `DB_RETRIES`: **10**: How many ORM init / DB connect attempts allowed. - `DB_RETRY_BACKOFF`: **3s**: time.Duration to wait before trying another ORM init / DB connect attempt, if failure occurred. - `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit. diff --git a/administration/config-cheat-sheet.zh-cn.md b/administration/config-cheat-sheet.zh-cn.md index e9877c44..91d2fb89 100644 --- a/administration/config-cheat-sheet.zh-cn.md +++ b/administration/config-cheat-sheet.zh-cn.md @@ -98,7 +98,7 @@ menu: - `SSL_MODE`: MySQL 或 PostgreSQL数据库是否启用SSL模式。 - `CHARSET`: **utf8mb4**: 仅当数据库为 MySQL 时有效, 可以为 "utf8" 或 "utf8mb4"。注意:如果使用 "utf8mb4",你的 MySQL InnoDB 版本必须在 5.6 以上。 - `PATH`: SQLite3 数据文件存放路径。 -- `LOG_SQL`: **true**: 显示生成的SQL,默认为真。 +- `LOG_SQL`: **false**: 显示生成的SQL,默认为真。 - `MAX_IDLE_CONNS` **0**: 最大空闲数据库连接 - `CONN_MAX_LIFETIME` **3s**: 数据库连接最大存活时间 From 6c465e0550d633d23f1b9e95327b57d86b59f098 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 11 Sep 2023 17:59:00 +0800 Subject: [PATCH 37/42] Use secure cookie for HTTPS sites (#26999) (#27013) Backport #26999 If the AppURL(ROOT_URL) is an HTTPS URL, then the COOKIE_SECURE's default value should be true. And, if a user visits an "http" site with "https" AppURL, they won't be able to login, and they should have been warned. The only problem is that the "language" can't be set either in such case, while I think it is not a serious problem, and it could be fixed easily if needed. --- administration/config-cheat-sheet.en-us.md | 2 +- administration/config-cheat-sheet.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index 3443d520..33f0c145 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -772,7 +772,7 @@ and - `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, redis-cluster, db, mysql, couchbase, memcache, postgres\]. Setting `db` will reuse the configuration in `[database]` - `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for db, empty (database config will be used); for others, the connection string. Relative paths will be made absolute against _`AppWorkPath`_. -- `COOKIE_SECURE`: **false**: Enable this to force using HTTPS for all session access. +- `COOKIE_SECURE`:**_empty_**: `true` or `false`. Enable this to force using HTTPS for all session access. If not set, it defaults to `true` if the ROOT_URL is an HTTPS URL. - `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID. - `GC_INTERVAL_TIME`: **86400**: GC interval in seconds. - `SESSION_LIFE_TIME`: **86400**: Session life time in seconds, default is 86400 (1 day) diff --git a/administration/config-cheat-sheet.zh-cn.md b/administration/config-cheat-sheet.zh-cn.md index 91d2fb89..9ae8baaf 100644 --- a/administration/config-cheat-sheet.zh-cn.md +++ b/administration/config-cheat-sheet.zh-cn.md @@ -200,7 +200,7 @@ menu: - `PROVIDER`: Session 内容存储方式,可选 `memory`, `file`, `redis` 或 `mysql`。 - `PROVIDER_CONFIG`: 如果是文件,那么这里填根目录;其他的要填主机地址和端口。 -- `COOKIE_SECURE`: 强制使用 HTTPS 作为session访问。 +- `COOKIE_SECURE`: **_empty_**:`true` 或 `false`。启用此选项以强制在所有会话访问中使用 HTTPS。如果没有设置,当 ROOT_URL 是 https 链接的时候默认设置为 true。 - `GC_INTERVAL_TIME`: Session失效时间。 ## Picture (`picture`) From 0f59bdcd2b509752373b4714a0a3937cfe627e63 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 20 Sep 2023 17:49:58 +0800 Subject: [PATCH 38/42] Improve actions docs related to `pull_request` event (#27126) (#27145) Backport #27126 by @Zettat123 Related to #27039 The `ref` property in Gitea Actions is different from GitHub Actions. This PR improves the documentation to explain the difference. Co-authored-by: Zettat123 --- usage/actions/faq.en-us.md | 3 +++ usage/actions/faq.zh-cn.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/usage/actions/faq.en-us.md b/usage/actions/faq.en-us.md index 031509a0..1d598729 100644 --- a/usage/actions/faq.en-us.md +++ b/usage/actions/faq.en-us.md @@ -180,3 +180,6 @@ For events supported only by GitHub, see GitHub's [documentation](https://docs.g | pull_request_review_comment | `created`, `edited` | | release | `published`, `edited` | | registry_package | `published` | + +> For `pull_request` events, in [GitHub Actions](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request), the `ref` is `refs/pull/:prNumber/merge`, which is a reference to the merge commit preview. However, Gitea has no such reference. +> Therefore, the `ref` in Gitea Actions is `refs/pull/:prNumber/head`, which points to the head of pull request rather than the preview of the merge commit. diff --git a/usage/actions/faq.zh-cn.md b/usage/actions/faq.zh-cn.md index f5dc8e17..7bb79d02 100644 --- a/usage/actions/faq.zh-cn.md +++ b/usage/actions/faq.zh-cn.md @@ -180,3 +180,6 @@ defaults: | pull_request_review_comment | `created`, `edited` | | release | `published`, `edited` | | registry_package | `published` | + +> 对于 `pull_request` 事件,在 [GitHub Actions](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) 中 `ref` 是 `refs/pull/:prNumber/merge`,它指向这个拉取请求合并提交的一个预览。但是 Gitea 没有这种 reference。 +> 因此,Gitea Actions 中 `ref` 是 `refs/pull/:prNumber/head`,它指向这个拉取请求的头分支而不是合并提交的预览。 From 4893ccbf3789d7ca2001ab9074dd71251f85c51e Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 25 Sep 2023 05:27:15 +0800 Subject: [PATCH 39/42] Update database-preparation and add note re: MariaDB (#27232) (#27235) Backport #27232 by @techknowlogick update DB docs per feedback. https://gitea.com/gitea/gitea-docusaurus/issues/69 Co-authored-by: techknowlogick --- installation/database-preparation.en-us.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installation/database-preparation.en-us.md b/installation/database-preparation.en-us.md index 21360fa4..c980bf5a 100644 --- a/installation/database-preparation.en-us.md +++ b/installation/database-preparation.en-us.md @@ -17,13 +17,13 @@ menu: # Database Preparation -You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter. +You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), MariaDB, SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter. Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database). Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers. -## MySQL +## MySQL/MariaDB 1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to: @@ -45,7 +45,7 @@ Note: All steps below requires that the database engine of your choice is instal ```sql SET old_passwords=0; - CREATE USER 'gitea' IDENTIFIED BY 'gitea'; + CREATE USER 'gitea'@'%' IDENTIFIED BY 'gitea'; ``` For remote database: From 82ce3ded0a6ffc853c3825470a6acf7c58f8c40f Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Sun, 19 Nov 2023 23:24:36 -0600 Subject: [PATCH 40/42] Update docs for docusaurus v3 (#28127) Signed-off-by: jolheiser --- administration/config-cheat-sheet.en-us.md | 4 ++-- help/faq.en-us.md | 4 ++-- help/faq.zh-cn.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index 33f0c145..a0653fdf 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -337,7 +337,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set. - `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`. - `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**: Enable SSH Authorized Principals Backup when rewriting all keys, default is true if `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`. -- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models/asymkey.PublicKey` and the others are strings which are shellquoted. +- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **`{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}`**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models/asymkey.PublicKey` and the others are strings which are shellquoted. - `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**: For the built-in SSH server, choose the ciphers to support for SSH connections, for system SSH this setting has no effect. - `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**: For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, for system SSH this setting has no effect. - `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect @@ -1384,7 +1384,7 @@ Please note that using `self` is not recommended for most cases, as it could mak Additionally, it requires you to mirror all the actions you need to your Gitea instance, which may not be worth it. Therefore, please use `self` only if you understand what you are doing. -In earlier versions (<= 1.19), `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. +In earlier versions (`<= 1.19`), `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. However, later updates removed those options, and now the only options are `github` and `self`, with the default value being `github`. However, if you want to use actions from other git server, you can use a complete URL in `uses` field, it's supported by Gitea (but not GitHub). Like `uses: https://gitea.com/actions/checkout@v3` or `uses: http://your-git-server/actions/checkout@v3`. diff --git a/help/faq.en-us.md b/help/faq.en-us.md index 01ff1703..83a61f2c 100644 --- a/help/faq.en-us.md +++ b/help/faq.en-us.md @@ -138,9 +138,9 @@ All Gitea instances have the built-in API and there is no way to disable it comp 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](development/api-usage.md). -You can see the latest API (for example) on . +You can see the latest API (for example) on https://try.gitea.io/api/swagger -You can also see an example of the `swagger.json` file at . +You can also see an example of the `swagger.json` file at https://try.gitea.io/swagger.v1.json ## Adjusting your server for public/private use diff --git a/help/faq.zh-cn.md b/help/faq.zh-cn.md index a11e074a..d94fbb52 100644 --- a/help/faq.zh-cn.md +++ b/help/faq.zh-cn.md @@ -142,9 +142,9 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。 有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。 -您可以在上查看最新的API(例如)。 +您可以在上查看最新的API(例如)https://try.gitea.io/api/swagger -您还可以在上查看`swagger.json`文件的示例 。 +您还可以在上查看`swagger.json`文件的示例 https://try.gitea.io/swagger.v1.json ## 调整服务器用于公共/私有使用 From 0b2d61ad8d185ca4683a1f6a5f389de36f669fbd Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Mon, 27 Nov 2023 19:07:00 +0900 Subject: [PATCH 41/42] Fix some incorrect links in docs (#28191) (#28233) Backport https://github.com/go-gitea/gitea/pull/28191 --- administration/email-setup.zh-cn.md | 2 +- usage/authentication.en-us.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administration/email-setup.zh-cn.md b/administration/email-setup.zh-cn.md index 0a7ac337..1e7009b8 100644 --- a/administration/email-setup.zh-cn.md +++ b/administration/email-setup.zh-cn.md @@ -55,7 +55,7 @@ PASSWD = `password` 要发送测试邮件以验证设置,请转到 Gitea > 站点管理 > 配置 > SMTP 邮件配置。 -有关所有选项的完整列表,请查看[配置速查表](doc/administration/config-cheat-sheet.zh-cn.md)。 +有关所有选项的完整列表,请查看[配置速查表](doc/administration/config-cheat-sheet.md)。 请注意:只有在使用 TLS 或 `HOST=localhost` 加密 SMTP 服务器通信时才支持身份验证。TLS 加密可以通过以下方式进行: diff --git a/usage/authentication.en-us.md b/usage/authentication.en-us.md index 6e4ede0b..6a6de08d 100644 --- a/usage/authentication.en-us.md +++ b/usage/authentication.en-us.md @@ -198,7 +198,7 @@ administrative user. field is set to `mail.com`, then Gitea will expect the `user email` field for an authenticated GIT instance to be `gituser@mail.com`.[^2] -**Note**: PAM support is added via [build-time flags](installation/install-from-source.md#build), +**Note**: PAM support is added via [build-time flags](installation/from-source.md#build), and the official binaries provided do not have this enabled. PAM requires that the necessary libpam dynamic library be available and the necessary PAM development headers be accessible to the compiler. From ce87264561c48148320f747e71d74510d618a81d Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 28 Nov 2023 15:30:45 +0900 Subject: [PATCH 42/42] Fix links in docs (#28234) (#28250) Backport #28234 --- administration/email-setup.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administration/email-setup.zh-cn.md b/administration/email-setup.zh-cn.md index 1e7009b8..519b1321 100644 --- a/administration/email-setup.zh-cn.md +++ b/administration/email-setup.zh-cn.md @@ -55,7 +55,7 @@ PASSWD = `password` 要发送测试邮件以验证设置,请转到 Gitea > 站点管理 > 配置 > SMTP 邮件配置。 -有关所有选项的完整列表,请查看[配置速查表](doc/administration/config-cheat-sheet.md)。 +有关所有选项的完整列表,请查看[配置速查表](administration/config-cheat-sheet.md)。 请注意:只有在使用 TLS 或 `HOST=localhost` 加密 SMTP 服务器通信时才支持身份验证。TLS 加密可以通过以下方式进行: