Skip to content

Commit 926b3b5

Browse files
committed
Use asciidoc variables refine version switch
1 parent ed574ff commit 926b3b5

38 files changed

+444
-316
lines changed

CN/antora.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,16 @@ asciidoc:
66
attributes:
77
source-language: asciidoc@
88
table-caption: false
9+
ivorysql-version: 5.1
10+
pg-version: 18.1
11+
package-link: 'https://github.com/ivorysql/ivorysql'
12+
package-link-x86_64-deb: 'IvorySQL-5.1-62069c2-20251211.amd64.deb'
13+
package-link-x86_64-rpm: 'IvorySQL-5.1-62069c2-20251211.x86_64.rpm'
14+
package-link-aarch64-deb: 'IvorySQL-5.1-62069c2-20251211.arm64.deb'
15+
package-link-aarch64-rpm: 'IvorySQL-5.1-62069c2-20251211.aarch64.rpm'
16+
package-link-mips64el-deb: 'IvorySQL-5.1-62069c2-20251211.mips64el.deb'
17+
package-link-mips64el-rpm: 'IvorySQL-5.1-62069c2-20251211.mips64el.rpm'
18+
package-link-loongarch64-deb: 'IvorySQL-5.1-62069c2-20251211.loongarch64.deb'
19+
package-link-loongarch64-rpm: 'IvorySQL-5.1-62069c2-20251211.loongarch64.rpm'
920
nav:
1021
- modules/ROOT/nav.adoc

CN/modules/ROOT/nav.adoc

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
11
* IvorySQL
2-
** xref:v5.1/welcome.adoc[欢迎]
3-
** xref:v5.1/1.adoc[发行说明]
4-
** xref:v5.1/2.adoc[关于IvorySQL]
2+
** xref:v{ivorysql-version}/welcome.adoc[欢迎]
3+
** xref:v{ivorysql-version}/1.adoc[发行说明]
4+
** xref:v{ivorysql-version}/2.adoc[关于IvorySQL]
55
** IvorySQL入门
6-
*** xref:v5.1/3.1.adoc[快速开始]
7-
*** xref:v5.1/3.2.adoc[日常监控]
8-
*** xref:v5.1/3.3.adoc[日常维护]
6+
*** xref:v{ivorysql-version}/3.1.adoc[快速开始]
7+
*** xref:v{ivorysql-version}/3.2.adoc[日常监控]
8+
*** xref:v{ivorysql-version}/3.3.adoc[日常维护]
99
** IvorySQL高级
10-
*** xref:v5.1/4.1.adoc[安装指南]
11-
*** xref:v5.1/4.2.adoc[集群搭建]
12-
*** xref:v5.1/4.5.adoc[迁移指南]
13-
*** xref:v5.1/4.3.adoc[开发者指南]
10+
*** xref:v{ivorysql-version}/4.1.adoc[安装指南]
11+
*** xref:v{ivorysql-version}/4.2.adoc[集群搭建]
12+
*** xref:v{ivorysql-version}/4.5.adoc[迁移指南]
13+
*** xref:v{ivorysql-version}/4.3.adoc[开发者指南]
1414
*** 容器化指南
15-
**** xref:v5.1/4.6.1.adoc[K8S部署]
16-
**** xref:v5.1/4.6.2.adoc[Operator部署]
17-
**** xref:v5.1/4.6.4.adoc[Docker & Podman部署]
18-
**** xref:v5.1/4.6.3.adoc[Docker Swarm & Docker Compose部署]
19-
*** xref:v5.1/4.4.adoc[运维管理指南]
15+
**** xref:v{ivorysql-version}/4.6.1.adoc[K8S部署]
16+
**** xref:v{ivorysql-version}/4.6.2.adoc[Operator部署]
17+
**** xref:v{ivorysql-version}/4.6.4.adoc[Docker & Podman部署]
18+
**** xref:v{ivorysql-version}/4.6.3.adoc[Docker Swarm & Docker Compose部署]
19+
*** xref:v{ivorysql-version}/4.4.adoc[运维管理指南]
2020
*** 云服务平台指南
21-
**** xref:v5.1/4.7.1.adoc[IvorySQL Cloud安装]
22-
**** xref:v5.1/4.7.2.adoc[IvorySQL Cloud使用]
21+
**** xref:v{ivorysql-version}/4.7.1.adoc[IvorySQL Cloud安装]
22+
**** xref:v{ivorysql-version}/4.7.2.adoc[IvorySQL Cloud使用]
2323
** IvorySQL生态
24-
*** xref:v5.1/cpu_arch_adp.adoc[芯片架构适配]
25-
*** xref:v5.1/os_arch_adp.adoc[操作系统适配]
24+
*** xref:v{ivorysql-version}/cpu_arch_adp.adoc[芯片架构适配]
25+
*** xref:v{ivorysql-version}/os_arch_adp.adoc[操作系统适配]
2626
*** 生态组件适配
27-
**** xref:v5.1/5.0.adoc[概述]
28-
**** xref:v5.1/5.1.adoc[postgis]
29-
**** xref:v5.1/5.2.adoc[pgvector]
30-
**** xref:v5.1/5.3.adoc[pgddl(DDL Extractor)]
31-
**** xref:v5.1/5.4.adoc[pg_cron]
32-
**** xref:v5.1/5.5.adoc[pgsql-http]
33-
**** xref:v5.1/5.6.adoc[plpgsql_check]
34-
**** xref:v5.1/5.7.adoc[pgroonga]
35-
**** xref:v5.1/5.8.adoc[pgaudit]
36-
**** xref:v5.1/5.9.adoc[pgrouting]
37-
**** xref:v5.1/5.10.adoc[system_stats]
27+
**** xref:v{ivorysql-version}/5.0.adoc[概述]
28+
**** xref:v{ivorysql-version}/5.1.adoc[postgis]
29+
**** xref:v{ivorysql-version}/5.2.adoc[pgvector]
30+
**** xref:v{ivorysql-version}/5.3.adoc[pgddl(DDL Extractor)]
31+
**** xref:v{ivorysql-version}/5.4.adoc[pg_cron]
32+
**** xref:v{ivorysql-version}/5.5.adoc[pgsql-http]
33+
**** xref:v{ivorysql-version}/5.6.adoc[plpgsql_check]
34+
**** xref:v{ivorysql-version}/5.7.adoc[pgroonga]
35+
**** xref:v{ivorysql-version}/5.8.adoc[pgaudit]
36+
**** xref:v{ivorysql-version}/5.9.adoc[pgrouting]
37+
**** xref:v{ivorysql-version}/5.10.adoc[system_stats]
3838
** IvorySQL架构设计
3939
*** 查询处理
40-
**** xref:v5.1/6.1.1.adoc[双parser]
40+
**** xref:v{ivorysql-version}/6.1.1.adoc[双parser]
4141
*** 兼容框架
42-
**** xref:v5.1/7.1.adoc[框架设计]
43-
**** xref:v5.1/7.2.adoc[GUC框架]
44-
**** xref:v5.1/7.4.adoc[双模式设计]
45-
**** xref:v5.1/6.2.1.adoc[initdb过程]
42+
**** xref:v{ivorysql-version}/7.1.adoc[框架设计]
43+
**** xref:v{ivorysql-version}/7.2.adoc[GUC框架]
44+
**** xref:v{ivorysql-version}/7.4.adoc[双模式设计]
45+
**** xref:v{ivorysql-version}/6.2.1.adoc[initdb过程]
4646
*** 兼容特性
47-
**** xref:v5.1/6.3.1.adoc[like]
48-
**** xref:v5.1/6.3.3.adoc[RowID]
49-
**** xref:v5.1/6.3.2.adoc[OUT 参数]
50-
**** xref:v5.1/6.3.4.adoc[%TYPE、%ROWTYPE]
51-
**** xref:v5.1/6.3.5.adoc[NLS 参数]
52-
**** xref:v5.1/6.3.6.adoc[函数与存储过程]
53-
**** xref:v5.1/6.3.7.adoc[嵌套子函数]
54-
**** xref:v5.1/6.3.8.adoc[Force View]
55-
**** xref:v5.1/6.3.9.adoc[大小写转换]
56-
**** xref:v5.1/6.3.10.adoc[sys_guid 函数]
57-
**** xref:v5.1/6.3.11.adoc[空字符串转null]
58-
**** xref:v5.1/6.3.12.adoc[CALL INTO]
47+
**** xref:v{ivorysql-version}/6.3.1.adoc[like]
48+
**** xref:v{ivorysql-version}/6.3.3.adoc[RowID]
49+
**** xref:v{ivorysql-version}/6.3.2.adoc[OUT 参数]
50+
**** xref:v{ivorysql-version}/6.3.4.adoc[%TYPE、%ROWTYPE]
51+
**** xref:v{ivorysql-version}/6.3.5.adoc[NLS 参数]
52+
**** xref:v{ivorysql-version}/6.3.6.adoc[函数与存储过程]
53+
**** xref:v{ivorysql-version}/6.3.7.adoc[嵌套子函数]
54+
**** xref:v{ivorysql-version}/6.3.8.adoc[Force View]
55+
**** xref:v{ivorysql-version}/6.3.9.adoc[大小写转换]
56+
**** xref:v{ivorysql-version}/6.3.10.adoc[sys_guid 函数]
57+
**** xref:v{ivorysql-version}/6.3.11.adoc[空字符串转null]
58+
**** xref:v{ivorysql-version}/6.3.12.adoc[CALL INTO]
5959
*** 内置函数
60-
**** xref:v5.1/6.4.1.adoc[sys_context]
61-
**** xref:v5.1/6.4.2.adoc[userenv]
62-
*** xref:v5.1/6.5.adoc[国标GB18030]
60+
**** xref:v{ivorysql-version}/6.4.1.adoc[sys_context]
61+
**** xref:v{ivorysql-version}/6.4.2.adoc[userenv]
62+
*** xref:v{ivorysql-version}/6.5.adoc[国标GB18030]
6363
** Oracle兼容功能列表
64-
*** xref:v5.1/7.3.adoc[1、大小写转换]
65-
*** xref:v5.1/7.5.adoc[2、LIKE操作符]
66-
*** xref:v5.1/7.6.adoc[3、匿名块]
67-
*** xref:v5.1/7.7.adoc[4、函数与存储过程]
68-
*** xref:v5.1/7.8.adoc[5、内置数据类型与内置函数]
69-
*** xref:v5.1/7.9.adoc[6、端口与IP]
70-
*** xref:v5.1/7.10.adoc[7、XML函数]
71-
*** xref:v5.1/7.11.adoc[8、sequence]
72-
*** xref:v5.1/7.12.adoc[9、包]
73-
*** xref:v5.1/7.13.adoc[10、不可见列]
74-
*** xref:v5.1/7.14.adoc[11、RowID]
75-
*** xref:v5.1/7.15.adoc[12、OUT 参数]
76-
*** xref:v5.1/7.16.adoc[13、%TYPE、%ROWTYPE]
77-
*** xref:v5.1/7.17.adoc[14、NLS 参数]
78-
*** xref:v5.1/7.18.adoc[15、Force View]
79-
*** xref:v5.1/7.19.adoc[16、嵌套子函数]
80-
*** xref:v5.1/7.20.adoc[17、sys_guid 函数]
81-
*** xref:v5.1/7.21.adoc[18、空字符串转null]
82-
*** xref:v5.1/7.22.adoc[19、CALL INTO]
64+
*** xref:v{ivorysql-version}/7.3.adoc[1、大小写转换]
65+
*** xref:v{ivorysql-version}/7.5.adoc[2、LIKE操作符]
66+
*** xref:v{ivorysql-version}/7.6.adoc[3、匿名块]
67+
*** xref:v{ivorysql-version}/7.7.adoc[4、函数与存储过程]
68+
*** xref:v{ivorysql-version}/7.8.adoc[5、内置数据类型与内置函数]
69+
*** xref:v{ivorysql-version}/7.9.adoc[6、端口与IP]
70+
*** xref:v{ivorysql-version}/7.10.adoc[7、XML函数]
71+
*** xref:v{ivorysql-version}/7.11.adoc[8、sequence]
72+
*** xref:v{ivorysql-version}/7.12.adoc[9、包]
73+
*** xref:v{ivorysql-version}/7.13.adoc[10、不可见列]
74+
*** xref:v{ivorysql-version}/7.14.adoc[11、RowID]
75+
*** xref:v{ivorysql-version}/7.15.adoc[12、OUT 参数]
76+
*** xref:v{ivorysql-version}/7.16.adoc[13、%TYPE、%ROWTYPE]
77+
*** xref:v{ivorysql-version}/7.17.adoc[14、NLS 参数]
78+
*** xref:v{ivorysql-version}/7.18.adoc[15、Force View]
79+
*** xref:v{ivorysql-version}/7.19.adoc[16、嵌套子函数]
80+
*** xref:v{ivorysql-version}/7.20.adoc[17、sys_guid 函数]
81+
*** xref:v{ivorysql-version}/7.21.adoc[18、空字符串转null]
82+
*** xref:v{ivorysql-version}/7.22.adoc[19、CALL INTO]
8383
** IvorySQL贡献指南
84-
*** xref:v5.1/8.1.adoc[社区贡献指南]
85-
*** xref:v5.1/8.2.adoc[asciidoc语法快速参考]
86-
** xref:v5.1/9.adoc[工具参考]
87-
** xref:v5.1/10.adoc[FAQ]
84+
*** xref:v{ivorysql-version}/8.1.adoc[社区贡献指南]
85+
*** xref:v{ivorysql-version}/8.2.adoc[asciidoc语法快速参考]
86+
** xref:v{ivorysql-version}/9.adoc[工具参考]
87+
** xref:v{ivorysql-version}/10.adoc[FAQ]
8888
* PostgreSQL
89-
** xref:v5.1/100.adoc[PG参数参考手册]
90-
** xref:v5.1/110.adoc[PG函数参考手册]
89+
** xref:v{ivorysql-version}/100.adoc[PG参数参考手册]
90+
** xref:v{ivorysql-version}/110.adoc[PG函数参考手册]

CN/modules/ROOT/pages/v5.1/23.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ IvorySQL由一个核心开发团队维护,该团队拥有对GitHub上的IvoryS
2929

3030
== **贡献者指南**
3131

32-
在贡献之前,我们需要了解下IvorySQL目前的版本以及文档的版本。目前,我们维护着5.1等版本,我们的版本紧跟PG的更新步伐,贡献之前请更新至最新版本。之后我们需要细心浏览一下贡献的样式风格,熟悉代码贡献风格、提Issue样式、拉取PR标题样式、代码注释样式、文档贡献样式、文章贡献样式,这可以帮助您尽快成为IvorySQL的贡献者奥~。
32+
在贡献之前,我们需要了解下IvorySQL目前的版本以及文档的版本。目前,我们维护着{ivorysql-version}等版本,我们的版本紧跟PG的更新步伐,贡献之前请更新至最新版本。之后我们需要细心浏览一下贡献的样式风格,熟悉代码贡献风格、提Issue样式、拉取PR标题样式、代码注释样式、文档贡献样式、文章贡献样式,这可以帮助您尽快成为IvorySQL的贡献者奥~。
3333

3434
=== 贡献前的准备
3535

CN/modules/ROOT/pages/v5.1/3.1.adoc

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ https://www.ionos.com/help/server-cloud-infrastructure/server-administration/cre
4242
+
4343

4444
创建或编辑IvorySQL yum源配置文件/etc/yum.repos.d/ivorysql.repo
45+
[source,bash,subs="attributes"]
4546
```
4647
vim /etc/yum.repos.d/ivorysql.repo
4748
[ivorysql5]
@@ -51,12 +52,13 @@ enabled=1
5152
gpgcheck=0
5253
```
5354
保存退出后,安装IvorySQL5
55+
[source,bash,subs="attributes"]
5456
```
55-
$ sudo dnf install -y ivorysql5-5.1
57+
$ sudo dnf install -y ivorysql5-{ivorysql-version}
5658
```
5759
....
5860
59-
正确安装后,数据库将被安装在/usr/ivory-5/路径下的IvorySQL-version(如:IvorySQL-5.1)文件夹内
61+
正确安装后,数据库将被安装在/usr/ivory-5/路径下的IvorySQL-version(如:IvorySQL-{ivorysql-version})文件夹内
6062
....
6163

6264
执行以下命令为ivorysql用户赋权:
@@ -112,28 +114,35 @@ ivorysql 3238 1551 0 20:35 pts/0 00:00:00 grep --color=auto postgres
112114
=== docker方式运行
113115

114116
** 从Docker Hub上获取IvorySQL镜像
117+
118+
[source,bash,subs="attributes"]
115119
```
116-
$ docker pull ivorysql/ivorysql:5.1-ubi8
120+
$ docker pull ivorysql/ivorysql:{ivorysql-version}-ubi8
117121
```
118122

119123
** 运行IvorySQL
124+
125+
[source,bash,subs="attributes"]
120126
```
121-
$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.1-ubi8
127+
$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:{ivorysql-version}-ubi8
122128
```
123129

124130
** 查看IvorySQL容器运行是否成功
131+
132+
[source,bash,subs="attributes"]
125133
```
126134
$ docker ps | grep ivorysql
127135
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
128-
6faa2d0ed705 ivorysql:5.1-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql
136+
6faa2d0ed705 ivorysql:{ivorysql-version}-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql
129137
```
130138

131139
== 数据库连接
132140

133141
psql连接数据库:
142+
[source,bash,subs="attributes"]
134143
```
135144
$ psql -d <database>
136-
psql (18.1)
145+
psql ({pg-version})
137146
Type "help" for help.
138147

139148
ivorysql=#
@@ -148,4 +157,4 @@ TIP: Docker运行IvorySQL时,需要添加额外参数,如 psql -d ivorysql -
148157

149158
现在可以开始使用IvorySQL啦!就是这么简单!
150159

151-
想要获得更多安装方式,请参考xref:v5.1/4.1.adoc[安装指南]
160+
想要获得更多安装方式,请参考xref:v{ivorysql-version}/4.1.adoc[安装指南]

CN/modules/ROOT/pages/v5.1/4.1.adoc

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IvorySQL安装方式包括以下5种:
1414
- <<源码安装>>
1515
- <<deb安装>>
1616

17-
本章将详细介绍每种方式的安装、运行及卸载过程。想要更快获得IvorySQL,请参阅xref:v5.1/3.1.adoc#快速开始[快速开始]。
17+
本章将详细介绍每种方式的安装、运行及卸载过程。想要更快获得IvorySQL,请参阅xref:v{ivorysql-version}/3.1.adoc#快速开始[快速开始]。
1818

1919
同样,安装前请先创建一个用户,并赋予其root权限,安装、使用和卸载均以该用户执行。这里以ivorysql用户为例。
2020

@@ -31,21 +31,26 @@ enabled=1
3131
gpgcheck=0
3232
```
3333
保存退出后,安装IvorySQL5
34+
[source,bash,subs="attributes"]
3435
```
35-
$ sudo dnf install -y ivorysql5-5.1
36+
$ sudo dnf install -y ivorysql5-{ivorysql-version}
3637
```
3738

3839
[[docker安装]]
3940
== docker安装
4041

4142
** 从Docker Hub上获取IvorySQL镜像
43+
44+
[source,bash,subs="attributes"]
4245
```
43-
$ docker pull ivorysql/ivorysql:5.1-ubi8
46+
$ docker pull ivorysql/ivorysql:{ivorysql-version}-ubi8
4447
```
4548

4649
** 运行IvorySQL
50+
51+
[source,bash,subs="attributes"]
4752
```
48-
$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.1-ubi8
53+
$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:{ivorysql-version}-ubi8
4954
```
5055
-e参数说明
5156
|====
@@ -72,8 +77,10 @@ $ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d
7277
$ sudo dnf install -y lz4 libicu libxslt python3
7378
```
7479
** 获取rpm包
80+
81+
[source,bash,subs="attributes"]
7582
```
76-
$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.1/IvorySQL-5.1-62069c2-20251211.x86_64.rpm
83+
$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/IvorySQL-{ivorysql-version}-9d890e9-20251120.x86_64.rpm
7784
```
7885
** 安装rpm包
7986

@@ -102,7 +109,7 @@ $ sudo apt install -y pkg-config uuid-dev
102109
```
103110
$ git clone https://github.com/IvorySQL/IvorySQL.git
104111
$ cd IvorySQL
105-
$ git checkout tags/IvorySQL_5.1
112+
$ git checkout -b IVORY_REL_5_STABLE origin/IVORY_REL_5_STABLE
106113
```
107114
** 配置
108115

@@ -143,13 +150,17 @@ $ sudo apt -y install pkg-config libreadline-dev libicu-dev libldap2-dev uuid-de
143150
```
144151

145152
** 获取deb包
153+
154+
[source,bash,subs="attributes"]
146155
```
147-
$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.1/IvorySQL-5.1-62069c2-20251211.amd64.deb
156+
$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/IvorySQL-{ivorysql-version}-a50789d-20250304.amd64.deb
148157
```
149158

150159
** 安装deb包
160+
161+
[source,bash,subs="attributes"]
151162
```
152-
$ sudo dpkg -i IvorySQL-5.1-62069c2-20251211.amd64.deb
163+
$ sudo dpkg -i IvorySQL-{ivorysql-version}-a50789d-20250304.amd64.deb
153164
```
154165
数据库将被安装在/usr/ivory-5/路径下。
155166

@@ -213,9 +224,10 @@ ivorysql 130445 130274 0 02:45 pts/1 00:00:00 grep --color=auto postgres
213224
== 数据库连接
214225

215226
psql连接数据库:
227+
[source,bash,subs="attributes"]
216228
```
217229
$ psql -d <database>
218-
psql (18.1)
230+
psql ({pg-version})
219231
Type "help" for help.
220232

221233
ivorysql=#
@@ -245,10 +257,12 @@ $ sudo dnf remove -y ivorysql5-5.0
245257
=== docker安装的卸载
246258

247259
执行以下命令,使IvorySQL容器停止运行,并删除IvorySQL容器和镜像:
260+
261+
[source,bash,subs="attributes"]
248262
```
249263
$ docker stop ivorysql
250264
$ docker rm ivorysql
251-
$ docker rmi ivorysql/ivorysql:5.1-ubi8
265+
$ docker rmi ivorysql/ivorysql:{ivorysql-version}-ubi8
252266
```
253267

254268
=== rpm安装的卸载
@@ -271,7 +285,9 @@ $ sudo rm -rf /usr/ivory-5
271285
=== deb安装的卸载
272286

273287
执行以下命令卸载数据库并清理文件夹:
288+
289+
[source,bash,subs="attributes"]
274290
```
275-
$ sudo dpkg -P IvorySQL-5.1
291+
$ sudo dpkg -P IvorySQL-{ivorysql-version}
276292
$ sudo rm -rf /usr/ivory-5
277293
```

0 commit comments

Comments
 (0)