Skip to content

Commit 4ea9a37

Browse files
jolheiserlunny
authored andcommitted
Add config option and shortcode for Gitea version (#7940)
Signed-off-by: jolheiser <[email protected]>
1 parent 9f58187 commit 4ea9a37

11 files changed

+20
-18
lines changed

docs/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21+
version: 1.9.2
2122

2223
menu:
2324
page:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ the destination platform from the [downloads page](https://dl.gitea.io/gitea/),
2121
the URL and replace the URL within the commands below:
2222

2323
```sh
24-
wget -O gitea https://dl.gitea.io/gitea/1.8.3/gitea-1.8.3-linux-amd64
24+
wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64
2525
chmod +x gitea
2626
```
2727

@@ -30,7 +30,7 @@ Gitea signs all binaries with a [GPG key](https://pgp.mit.edu/pks/lookup?op=vind
3030

3131
```sh
3232
gpg --keyserver pgp.mit.edu --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
33-
gpg --verify gitea-1.8.3-linux-amd64.asc gitea-1.8.3-linux-amd64
33+
gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-amd64
3434
```
3535

3636
## Test

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menu:
1818
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:
1919

2020
```
21-
wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64
21+
wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64
2222
chmod +x gitea
2323
```
2424

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menu:
1818
所有下载均包括 SQLite, MySQL 和 PostgreSQL 的支持,同时所有资源均已嵌入到可执行程序中,这一点和老版本有所不同。 基于二进制的安装非常简单,只要从 [下载页面](https://dl.gitea.io/gitea) 选择对应平台,拷贝下载URL,执行以下命令即可(以Linux为例):
1919

2020
```
21-
wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64
21+
wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64
2222
chmod +x gitea
2323
```
2424

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menu:
1818
所有的執行檔皆支援 SQLite, MySQL and PostgreSQL,且所有檔案都已經包在執行檔內,這一點跟之前的版本有所不同。關於執行檔的安裝方式非常簡單,只要從[下載頁面](https://dl.gitea.io/gitea)選擇相對應平台,複製下載連結,使用底下指令就可以完成了:
1919

2020
```
21-
wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64
21+
wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64
2222
chmod +x gitea
2323
```
2424

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ To work with tagged releases, the following commands can be used:
5353

5454
```bash
5555
git branch -a
56-
git checkout v1.0
56+
git checkout v{{< version >}}
5757
```
5858

5959
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
@@ -63,14 +63,14 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
6363
git fetch origin pull/xyz/head:pr-xyz
6464
```
6565

66-
To build Gitea from source at a specific tagged release (like v1.0.0), list the
66+
To build Gitea from source at a specific tagged release (like v{{< version >}}), list the
6767
available tags and check out the specific tag.
6868

6969
List available tags with the following.
7070

7171
```bash
7272
git tag -l
73-
git checkout v1.0.0 # or git checkout pr-xyz
73+
git checkout v{{< version >}} # or git checkout pr-xyz
7474
```
7575

7676
## Build

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Si vous souhaitez compiler la dernière version stable, utilisez les étiquettes
3535

3636
```
3737
git branch -a
38-
git checkout v1.0
38+
git checkout v{{< version >}}
3939
```
4040

4141
Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activer cette branche en premier :
@@ -44,11 +44,11 @@ Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activ
4444
git fetch origin pull/xyz/head:pr-xyz # xyz is PR value
4545
```
4646

47-
Enfin, vous pouvez directement utiliser les versions étiquettées (ex : `v1.0.0`). Pour utiliser les étiquettes, vous devez lister les étiquettes disponibles et choisir une étiquette spécifique avec les commandes suivantes :
47+
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 :
4848

4949
```
5050
git tag -l
51-
git checkout v1.0.0
51+
git checkout v{{< version >}}
5252
git checkout pr-xyz
5353
```
5454

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ cd $GOPATH/src/code.gitea.io/gitea
3232

3333
```
3434
git branch -a
35-
git checkout v1.0
35+
git checkout v{{< version >}}
3636
```
3737

38-
最后,你也可以直接使用标签版本如 `v1.0.0`。你可以执行以下命令列出可用的版本并选择某个版本签出:
38+
最后,你也可以直接使用标签版本如 `v{{< version >}}`。你可以执行以下命令列出可用的版本并选择某个版本签出:
3939

4040
```
4141
git tag -l
42-
git checkout v1.0.0
42+
git checkout v{{< version >}}
4343
```
4444

4545
## 编译

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ cd $GOPATH/src/code.gitea.io/gitea
3232

3333
```
3434
git branch -a
35-
git checkout v1.0
35+
git checkout v{{< version >}}
3636
```
3737

38-
最後您也可以直接編譯最新的標籤版本像是 `v1.0.0`,假如您想要從原始碼編譯,這方法是最合適的,在編譯標籤版本前,您需要列出當下所有標籤,並且直接切換到標籤版本,請使用底下指令::
38+
最後您也可以直接編譯最新的標籤版本像是 `v{{< version >}}`,假如您想要從原始碼編譯,這方法是最合適的,在編譯標籤版本前,您需要列出當下所有標籤,並且直接切換到標籤版本,請使用底下指令::
3939

4040
```
4141
git tag -l
42-
git checkout v1.0.0
42+
git checkout v{{< version >}}
4343
```
4444

4545
## 編譯

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Create a directory like `gitea` and paste the following content into a file name
3131
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
3232
If you don't give the volume correct permissions, the container may not start.
3333
Also be aware that the tag `:latest` will install the current development version.
34-
For a stable release you can use `:1` or specify a certain release like `:1.5.1`.
34+
For a stable release you can use `:1` or specify a certain release like `:{{< version >}}`.
3535

3636
```yaml
3737
version: "2"

docs/layouts/shortcodes/version.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ .Site.Params.version }}

0 commit comments

Comments
 (0)