backport v27 changes (#471)

See https://github.com/go-gitea/gitea/issues/38621

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/471
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
TheFox0x7
2026-07-26 05:20:08 +00:00
committed by Lunny Xiao
parent 45724f19ac
commit 74674a6259
13 changed files with 32 additions and 32 deletions

View File

@@ -13,10 +13,10 @@ aliases:
## 獲取頁面
Gitea 源程式碼附帶了範例頁面,位於 `contrib/legal` 目錄中。將它們複製到 `custom/public/assets/` 目錄下。例如,如果要添加隱私政策:
Gitea 源程式碼附帶了範例頁面,位於 `contrib/service/sample-page` 目錄中。將它們複製到 `custom/public/assets/` 目錄下。例如,如果要添加隱私政策:
```
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/service/sample-page/privacy.html.sample
```
現在,你需要編輯該頁面以滿足你的需求。特別是,你必須更改電子電子郵件地址、網址以及與 "Your Gitea Instance" 相關的引用,以匹配你的情況。

View File

@@ -18,7 +18,7 @@ aliases:
sudo vim /etc/systemd/system/gitea.service
```
接著拷貝範例程式碼 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) 並取消對任何需要運行在主機上的服務部分的註釋,譬如 MySQL。
接著拷貝範例程式碼 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/service/systemd/gitea.service) 並取消對任何需要運行在主機上的服務部分的註釋,譬如 MySQL。
修改 userhome 目錄以及其他必須的初始化參數,如果使用自訂端口,則需修改 PORT 參數,反之如果使用預設端口則需刪除 -p 標記。
@@ -51,7 +51,7 @@ sudo vim /etc/supervisor/supervisord.conf
```
增加如下範例設定
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea)。
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/service/supervisor/gitea)。
將 user(git) 和 home(/home/git) 設定為與上文部署中匹配的值。如果使用自訂端口,則需修改 PORT 參數,反之如果使用預設端口則需刪除 -p 標記。

View File

@@ -13,10 +13,10 @@ aliases:
## 獲取頁面
Gitea 源程式碼附帶了範例頁面,位於 `contrib/legal` 目錄中。將它們複製到 `custom/public/assets/` 目錄下。例如,如果要添加隱私政策:
Gitea 源程式碼附帶了範例頁面,位於 `contrib/service/sample-page` 目錄中。將它們複製到 `custom/public/assets/` 目錄下。例如,如果要添加隱私政策:
```
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/service/sample-page/privacy.html.sample
```
現在,你需要編輯該頁面以滿足你的需求。特別是,你必須更改電子電子郵件地址、網址以及與 "Your Gitea Instance" 相關的引用,以匹配你的情況。

View File

@@ -18,7 +18,7 @@ aliases:
sudo vim /etc/systemd/system/gitea.service
```
接著拷貝範例程式碼 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) 並取消對任何需要運行在主機上的服務部分的註釋,譬如 MySQL。
接著拷貝範例程式碼 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/service/systemd/gitea.service) 並取消對任何需要運行在主機上的服務部分的註釋,譬如 MySQL。
修改 userhome 目錄以及其他必須的初始化參數,如果使用自訂端口,則需修改 PORT 參數,反之如果使用預設端口則需刪除 -p 標記。
@@ -51,7 +51,7 @@ sudo vim /etc/supervisor/supervisord.conf
```
增加如下範例設定
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea)。
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/service/supervisor/gitea)。
將 user(git) 和 home(/home/git) 設定為與上文部署中匹配的值。如果使用自訂端口,則需修改 PORT 參數,反之如果使用預設端口則需刪除 -p 標記。