Skip to content

Commit 35c503f

Browse files
HesterGearl-warren
authored andcommitted
Unify doc links to use paths relative to doc folder (go-gitea#24979) (go-gitea#25000)
Backport go-gitea#24979 Changes: 1. Use uniform links types relative to doc folder (start with `doc/`) 2. According to [docusaurus links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is used, the `href` is resolved as URL location, but not file location. So need to use `[text]({{< relref "path" >}})` instead. (cherry picked from commit d2c9fb0)
1 parent 442a13b commit 35c503f

10 files changed

+21
-23
lines changed

docs/content/doc/development/hacking-on-gitea.en-us.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ to the Gitea sources. Otherwise, changes can't be pushed.
121121
## Building Gitea (Basic)
122122

123123
Take a look at our
124-
<a href='{{< relref "doc/installation/from-source.en-us.md" >}}'>instructions</a>
125-
for <a href='{{< relref "doc/installation/from-source.en-us.md" >}}'>building
126-
from source</a>.
124+
[instructions]({{< relref "doc/installation/from-source.en-us.md" >}})
125+
for [building from source]({{< relref "doc/installation/from-source.en-us.md" >}}).
127126

128127
The simplest recommended way to build from source is:
129128

@@ -264,7 +263,7 @@ OpenAPI 3 documentation.
264263
When creating new configuration options, it is not enough to add them to the
265264
`modules/setting` files. You should add information to `custom/conf/app.ini`
266265
and to the
267-
<a href='{{< relref "doc/administration/config-cheat-sheet.en-us.md" >}}'>configuration cheat sheet</a>
266+
[configuration cheat sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}})
268267
found in `docs/content/doc/administer/config-cheat-sheet.en-us.md`
269268

270269
### Changing the logo

docs/content/doc/development/hacking-on-gitea.zh-cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ git fetch --all --prune
113113
## 构建 Gitea(基本)
114114

115115
看看我们的
116-
<a href='{{ < relref "doc/installation/from-source.en-us.md" > }}'>说明</a>
117-
关于如何 <a href='{{ < relref "doc/installation/from-source.en-us.md" > }}'>从源代码构建</a>
116+
[说明]({{< relref "doc/installation/from-source.zh-cn.md" >}})
117+
关于如何[从源代码构建]({{< relref "doc/installation/from-source.zh-cn.md" >}})
118118

119119
从源代码构建的最简单推荐方法是:
120120

@@ -247,7 +247,7 @@ make swagger-check
247247
### 创建新的配置选项
248248

249249
创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini`
250-
并到 <a href = '{{ < relref "doc/administration/config-cheat-sheet.en-us.md" > }}'>配置备忘单</a>
250+
并到[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md" >}})
251251
`docs/content/doc/advanced/config-cheat-sheet.en-us.md` 中找到
252252

253253
### 更改Logo

docs/content/doc/installation/from-binary.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to loa
186186
Gitea binary, usually producing an error such as `./gitea: /lib/x86_64-linux-gnu/libc.so.6:
187187
version 'GLIBC\_2.14' not found (required by ./gitea)`. This is due to the integrated
188188
SQLite support in the binaries provided by dl.gitea.com. In this situation, it is usually
189-
possible to [install from source]({{< relref "from-source.en-us.md" >}}), without including
189+
possible to [install from source]({{< relref "doc/installation/from-source.en-us.md" >}}), without including
190190
SQLite support.
191191

192192
### Running Gitea on another port

docs/content/doc/installation/from-binary.fr-fr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Après avoir suivi les étapes ci-dessus, vous aurez un binaire `gitea` dans vot
3434

3535
### Anciennes version de glibc
3636

37-
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 "from-source.fr-fr.md" >}}).
37+
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" >}}).
3838

3939
### Exécuter Gitea avec un autre port
4040

docs/content/doc/installation/from-binary.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ cp gitea /usr/local/bin/gitea
129129

130130
### 1. 创建服务自动启动 Gitea(推荐)
131131

132-
学习创建 [Linux 服务]({{< relref "run-as-service-in-ubuntu.zh-cn.md" >}})
132+
学习创建 [Linux 服务]({{< relref "doc/installation/run-as-service-in-ubuntu.zh-cn.md" >}})
133133

134134
### 2. 通过命令行终端运行
135135

@@ -161,4 +161,4 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
161161

162162
> 更多经验总结,请参考英文版 [Troubleshooting](/en-us/install-from-binary/#troubleshooting)
163163
164-
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
164+
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "doc/help/seek-help.zh-cn.md" >}})

docs/content/doc/installation/from-package.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ There is a [Gitea](https://chocolatey.org/packages/gitea) package for Windows by
7272
choco install gitea
7373
```
7474

75-
Or follow the [deployment from binary]({{< relref "from-binary.en-us.md" >}}) guide.
75+
Or follow the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide.
7676

7777
## macOS
7878

7979
Currently, the only supported method of installation on MacOS is [Homebrew](http://brew.sh/).
80-
Following the [deployment from binary]({{< relref "from-binary.en-us.md" >}}) guide may work,
80+
Following the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide may work,
8181
but is not supported. To install Gitea via `brew`:
8282

8383
```

docs/content/doc/installation/from-package.fr-fr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ menu:
1717

1818
## Linux
1919

20-
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 "from-binary.fr-fr.md" >}}) avec le binaire pré-compilé.
20+
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é.
2121

2222
## Windows
2323

24-
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 "from-binary.fr-fr.md" >}}) avec le binaire pré-compilé.
24+
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é.
2525

2626
## macOS
2727

28-
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 "from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes :
28+
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 :
2929

3030
```
3131
brew tap go-gitea/gitea

docs/content/doc/installation/from-package.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ OpenSUSE 构建服务为 [openSUSE 和 SLE](https://software.opensuse.org/downlo
6464
choco install gitea
6565
```
6666

67-
你也可以 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}}) 。
67+
你也可以 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}}) 。
6868

6969
## macOS
7070

71-
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
71+
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
7272

7373
```
7474
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea

docs/content/doc/installation/from-package.zh-tw.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ menu:
1717

1818
## Linux
1919

20-
目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝]({{< relref "from-binary.zh-tw.md" >}})方式。
20+
目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。
2121

2222
## Windows
2323

@@ -27,11 +27,11 @@ menu:
2727
choco install gitea
2828
```
2929

30-
也可以參考[執行檔安裝]({{< relref "from-binary.zh-tw.md" >}})方式。
30+
也可以參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。
3131

3232
## macOS
3333

34-
目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝]({{< relref "from-binary.zh-tw.md" >}})方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令:
34+
目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令:
3535

3636
```
3737
brew tap go-gitea/gitea

docs/content/doc/installation/from-source.en-us.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ executable path, you will have to manage this yourself.
3333

3434
**Note 2**: Go version {{< min-go-version >}} or higher is required. However, it is recommended to
3535
obtain the same version as our continuous integration, see the advice given in
36-
<a href='{{< relref "doc/development/hacking-on-gitea.en-us.md" >}}'>Hacking on
37-
Gitea</a>
36+
[Hacking on Gitea]({{< relref "doc/development/hacking-on-gitea.en-us.md" >}})
3837

3938
**Table of Contents**
4039

0 commit comments

Comments
 (0)