Skip to content

Commit 66c6e3d

Browse files
committed
doc: VuePress infrastructure upgrade
1 parent 3d2a6d3 commit 66c6e3d

File tree

24 files changed

+2926
-2622
lines changed

24 files changed

+2926
-2622
lines changed

.github/workflows/docs-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: setup pnpm
2424
uses: pnpm/action-setup@v3
2525
with:
26-
version: 8
26+
version: 10
2727
- name: setup Node.js
2828
uses: actions/setup-node@v4
2929
with:

.github/workflows/docs-format-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: setup pnpm
1919
uses: pnpm/action-setup@v3
2020
with:
21-
version: 8
21+
version: 10
2222
- name: setup Node.js
2323
uses: actions/setup-node@v4
2424
with:

polar-doc/docs/.vuepress/config.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { defineUserConfig } from "vuepress";
22
import { path } from "vuepress/utils";
33
import { defaultTheme } from "@vuepress/theme-default";
44
import { docsearchPlugin } from "@vuepress/plugin-docsearch";
5-
import { mdEnhancePlugin } from "vuepress-plugin-md-enhance";
5+
import { markdownMathPlugin } from "@vuepress/plugin-markdown-math";
6+
import { markdownExtPlugin } from "@vuepress/plugin-markdown-ext";
67
import { registerComponentsPlugin } from "@vuepress/plugin-register-components";
78
import { navbar, sidebar } from "./configs";
89
import { viteBundler } from "@vuepress/bundler-vite";
@@ -124,8 +125,10 @@ export default defineUserConfig({
124125
},
125126
},
126127
}),
127-
mdEnhancePlugin({
128-
katex: true,
128+
markdownMathPlugin({
129+
type: "katex",
130+
}),
131+
markdownExtPlugin({
129132
footnote: true,
130133
}),
131134
registerComponentsPlugin({
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
1+
// === colors ===
12
:root {
23
scroll-behavior: smooth;
34

4-
// brand colors
5-
--c-brand: #fc5207;
6-
--c-brand-light: #fc5207;
5+
// accent colors
6+
--vp-c-accent: #fc5207;
7+
--vp-c-accent-bg: #fc5207;
8+
--vp-c-accent-hover: #fc5207;
79

8-
--c-tip: #fc5207;
10+
--badge-c-tip-text: #fc5207;
11+
--badge-c-tip-bg: #fc51072c;
912

1013
--content-width: 1020px;
1114
}
12-
13-
html.dark {
14-
// brand colors
15-
--c-brand: #fc5207;
16-
--c-brand-light: #fc5207;
17-
18-
--c-tip: #fc5207;
19-
}

polar-doc/docs/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ footer: Apache 2.0 Licensed | Copyright © Alibaba Group, Inc.
1111

1212
Pull the [local instance image](https://hub.docker.com/r/polardb/polardb_pg_local_instance/tags) of PolarDB for PostgreSQL based on local storage. Create and run the container, and try PolarDB-PG instance directly:
1313

14-
:::: code-group
15-
::: code-group-item DockerHub
14+
::: code-tabs
15+
@tab DockerHub
1616

1717
```bash:no-line-numbers
1818
# pull the instance image and run the container
@@ -26,8 +26,7 @@ postgres=# SELECT version();
2626
(1 row)
2727
```
2828

29-
:::
30-
::: code-group-item Alibaba Cloud ACR
29+
@tab Alibaba Cloud ACR
3130

3231
```bash:no-line-numbers
3332
# pull the instance image and run the container
@@ -42,4 +41,3 @@ postgres=# SELECT version();
4241
```
4342

4443
:::
45-
::::

polar-doc/docs/deploying/db-localfs.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,20 @@ minute: 15
1616

1717
我们已提供 PolarDB-PG 的 [单机实例镜像](https://hub.docker.com/r/polardb/polardb_pg_local_instance/tags),里面已包含启动 PolarDB-PG 单机实例的入口脚本。
1818

19-
:::: code-group
20-
::: code-group-item DockerHub
19+
::: code-tabs
20+
@tab DockerHub
2121

2222
```bash:no-line-numbers
2323
docker pull polardb/polardb_pg_local_instance:15
2424
```
2525

26-
:::
27-
::: code-group-item 阿里云 ACR
26+
@tab 阿里云 ACR
2827

2928
```bash:no-line-numbers
3029
docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
3130
```
3231

3332
:::
34-
::::
3533

3634
## 初始化数据库
3735

@@ -43,8 +41,8 @@ docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instan
4341

4442
使用如下命令初始化数据库:
4543

46-
:::: code-group
47-
::: code-group-item DockerHub
44+
::: code-tabs
45+
@tab DockerHub
4846

4947
```bash:no-line-numbers
5048
docker run -it --rm \
@@ -57,8 +55,7 @@ docker run -it --rm \
5755
echo 'done'
5856
```
5957

60-
:::
61-
::: code-group-item 阿里云 ACR
58+
@tab 阿里云 ACR
6259

6360
```bash:no-line-numbers
6461
docker run -it --rm \
@@ -72,14 +69,13 @@ docker run -it --rm \
7269
```
7370

7471
:::
75-
::::
7672

7773
## 启动数据库服务
7874

7975
数据库初始化完毕后,使用 `-d` 参数以后台模式创建容器,启动 PolarDB-PG 服务。通常 PolarDB-PG 的端口需要暴露给外界使用,使用 `-p` 参数将容器内的端口范围暴露到容器外。比如,初始化数据库时使用的是 `5432-5434` 端口,如下命令将会把这三个端口映射到容器外的 `54320-54322` 端口:
8076

81-
:::: code-group
82-
::: code-group-item DockerHub
77+
::: code-tabs
78+
@tab DockerHub
8379

8480
```bash:no-line-numbers
8581
docker run -d \
@@ -89,8 +85,7 @@ docker run -d \
8985
polardb/polardb_pg_local_instance:15
9086
```
9187

92-
:::
93-
::: code-group-item 阿里云 ACR
88+
@tab 阿里云 ACR
9489

9590
```bash:no-line-numbers
9691
docker run -d \
@@ -101,12 +96,11 @@ docker run -d \
10196
```
10297

10398
:::
104-
::::
10599

106100
或者也可以直接让容器与宿主机共享网络:
107101

108-
:::: code-group
109-
::: code-group-item DockerHub
102+
::: code-tabs
103+
@tab DockerHub
110104

111105
```bash:no-line-numbers
112106
docker run -d \
@@ -116,8 +110,7 @@ docker run -d \
116110
polardb/polardb_pg_local_instance:15
117111
```
118112

119-
:::
120-
::: code-group-item 阿里云 ACR
113+
@tab 阿里云 ACR
121114

122115
```bash:no-line-numbers
123116
docker run -d \
@@ -128,4 +121,3 @@ docker run -d \
128121
```
129122

130123
:::
131-
::::

polar-doc/docs/deploying/fs-pfs.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ PolarDB File System,简称 PFS 或 PolarFS,是由阿里云自主研发的高
1616

1717
推荐使用 PolarDB-PG 的 [可执行文件镜像](https://hub.docker.com/r/polardb/polardb_pg_binary/tags),其中已经包含了编译完毕的 PFS 工具,无需手动编译安装。通过以下命令进入容器即可:
1818

19-
:::: code-group
20-
::: code-group-item DockerHub
19+
::: code-tabs
20+
@tab DockerHub
2121

2222
```shell:no-line-numbers
2323
docker pull polardb/polardb_pg_binary:15
@@ -31,8 +31,7 @@ docker run -it \
3131
bash
3232
```
3333

34-
:::
35-
::: code-group-item 阿里云 ACR
34+
@tab 阿里云 ACR
3635

3736
```shell:no-line-numbers
3837
docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_binary:15
@@ -46,7 +45,6 @@ docker run -it \
4645
```
4746

4847
:::
49-
::::
5048

5149
PFS 的手动编译安装方式请参考 PFS 的 [README](https://github.com/ApsaraDB/polardb-file-system/blob/master/Readme-CN.md),此处不再赘述。
5250

polar-doc/docs/deploying/quick-start.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ minute: 5
2727

2828
拉取 PolarDB for PostgreSQL 的 [单机实例镜像](https://hub.docker.com/r/polardb/polardb_pg_local_instance/tags),运行容器并试用 PolarDB-PG:
2929

30-
:::: code-group
31-
::: code-group-item DockerHub
30+
::: code-tabs
31+
@tab DockerHub
3232

3333
```bash:no-line-numbers
3434
# 拉取镜像并运行容器
@@ -42,8 +42,7 @@ postgres=# SELECT version();
4242
(1 row)
4343
```
4444

45-
:::
46-
::: code-group-item 阿里云 ACR
45+
@tab 阿里云 ACR
4746

4847
```bash:no-line-numbers
4948
# 拉取镜像并运行容器
@@ -58,4 +57,3 @@ postgres=# SELECT version();
5857
```
5958

6059
:::
61-
::::

polar-doc/docs/development/customize-dev-env.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ PolarDB-PG 提供已经构建完毕的开发镜像 [`polardb/polardb_pg_devel`](
2525

2626
通过如下方式即可拉取相应发行版的镜像:
2727

28-
:::: code-group
29-
::: code-group-item DockerHub
28+
::: code-tabs
29+
@tab DockerHub
3030

3131
```bash:no-line-numbers
3232
docker pull polardb/polardb_pg_devel:centos7
@@ -38,8 +38,7 @@ docker pull polardb/polardb_pg_devel:ubuntu22.04
3838
docker pull polardb/polardb_pg_devel:ubuntu24.04
3939
```
4040

41-
:::
42-
::: code-group-item 阿里云 ACR
41+
@tab 阿里云 ACR
4342

4443
```bash:no-line-numbers
4544
docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:centos7
@@ -52,6 +51,5 @@ docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:ubuntu
5251
```
5352

5453
:::
55-
::::
5654

5755
另外,也提供了构建上述开发镜像的 [Dockerfile](https://github.com/ApsaraDB/polardb-pg-docker-images),您可以根据自己的需要在 Dockerfile 中添加更多依赖,然后构建自己的开发镜像。

polar-doc/docs/development/dev-on-docker.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,20 @@ minute: 10
1212

1313
[GitHub](https://github.com/ApsaraDB/PolarDB-for-PostgreSQL) 上下载 PolarDB for PostgreSQL 的源代码,稳定分支为 `POLARDB_15_STABLE`
1414

15-
:::: code-group
16-
::: code-group-item GitHub
15+
::: code-tabs
16+
@tab GitHub
1717

1818
```bash:no-line-numbers
1919
git clone -b POLARDB_15_STABLE https://github.com/ApsaraDB/PolarDB-for-PostgreSQL.git
2020
```
2121

22-
:::
23-
::: code-group-item Gitee
22+
@tab Gitee
2423

2524
```bash:no-line-numbers
2625
git clone -b POLARDB_15_STABLE https://gitee.com/mirrors/PolarDB-for-PostgreSQL
2726
```
2827

2928
:::
30-
::::
3129

3230
代码克隆完毕后,进入源码目录:
3331

@@ -39,22 +37,20 @@ cd PolarDB-for-PostgreSQL/
3937

4038
拉取 PolarDB-PG 的 [开发镜像](https://hub.docker.com/r/polardb/polardb_pg_devel/tags)
4139

42-
:::: code-group
43-
::: code-group-item DockerHub
40+
::: code-tabs
41+
@tab DockerHub
4442

4543
```bash:no-line-numbers
4644
docker pull polardb/polardb_pg_devel:ubuntu24.04
4745
```
4846

49-
:::
50-
::: code-group-item 阿里云 ACR
47+
@tab 阿里云 ACR
5148

5249
```bash:no-line-numbers
5350
docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:ubuntu24.04
5451
```
5552

5653
:::
57-
::::
5854

5955
## 创建并运行容器
6056

@@ -63,8 +59,8 @@ docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:ubuntu
6359
- 在容器内的环境中编译源码
6460
- 在容器外(开发机器上)使用编辑器来查看或修改代码
6561

66-
:::: code-group
67-
::: code-group-item DockerHub
62+
::: code-tabs
63+
@tab DockerHub
6864

6965
```bash:no-line-numbers
7066
docker run -it \
@@ -75,8 +71,7 @@ docker run -it \
7571
bash
7672
```
7773

78-
:::
79-
::: code-group-item 阿里云 ACR
74+
@tab 阿里云 ACR
8075

8176
```bash:no-line-numbers
8277
docker run -it \
@@ -88,7 +83,6 @@ docker run -it \
8883
```
8984

9085
:::
91-
::::
9286

9387
进入容器后,为容器内用户获取源码目录的权限,然后编译部署 PolarDB-PG 实例。
9488

0 commit comments

Comments
 (0)