Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update documentation for Halo 2.19 #407

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/developer-guide/core/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ git checkout ${branch_name}

## 构建 Fat Jar

构建之前需要修改 `gradle.properties` 中的 `version` 属性(推荐遵循 [SemVer 规范](https://semver.org/)),例如:`version=2.18.0`
构建之前需要修改 `gradle.properties` 中的 `version` 属性(推荐遵循 [SemVer 规范](https://semver.org/)),例如:`version=2.19.0`

```bash
cd path/to/halo
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/install/docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"

services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
restart: on-failure:3
depends_on:
halodb:
Expand Down Expand Up @@ -108,7 +108,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"

services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
restart: on-failure:3
depends_on:
halodb:
Expand Down Expand Up @@ -175,7 +175,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"

services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
restart: on-failure:3
volumes:
- ./halo2:/root/.halo2
Expand All @@ -198,7 +198,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"

services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
restart: on-failure:3
network_mode: "host"
volumes:
Expand Down Expand Up @@ -249,7 +249,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
```yaml {3}
services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
```

```bash
Expand Down Expand Up @@ -313,7 +313,7 @@ networks:

services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
restart: on-failure:3
volumes:
- ./halo2:/root/.halo2
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/install/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
1. 创建容器

```bash
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.18
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.19
```

:::info
Expand Down Expand Up @@ -60,7 +60,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
2. 拉取新版本镜像

```bash
docker pull registry.fit2cloud.com/halo/halo:2.18
docker pull registry.fit2cloud.com/halo/halo:2.19
```

3. 停止运行中的容器
Expand All @@ -75,5 +75,5 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
修改版本号后,按照最初安装的方式,重新创建容器即可。

```bash
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.18
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.19
```
4 changes: 2 additions & 2 deletions docs/getting-started/install/jar-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ title: 使用 JAR 文件部署
3. 下载运行包

```bash
wget https://dl.halo.run/release/halo-2.18.0.jar -O halo.jar
wget https://dl.halo.run/release/halo-2.19.0.jar -O halo.jar
```

:::info
Expand Down Expand Up @@ -244,7 +244,7 @@ journalctl -n 20 -u halo
3. 下载新版本的 Halo 运行包,覆盖原有的运行包

```bash
wget https://dl.halo.run/release/halo-2.18.0.jar -O /home/halo/app/halo.jar
wget https://dl.halo.run/release/halo-2.19.0.jar -O /home/halo/app/halo.jar
```

4. 启动 Halo 服务
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/install/other/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ networks:

services:
halo:
image: registry.fit2cloud.com/halo/halo:2.18
image: registry.fit2cloud.com/halo/halo:2.19
container_name: halo
restart: on-failure:3
volumes:
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/install/podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Podman 采用无守护进程的包容性架构,因此可以更安全、更简

```bash
mkdir -p ~/.halo2
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.18
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.19
```

:::info
Expand Down Expand Up @@ -86,7 +86,7 @@ Podman 采用无守护进程的包容性架构,因此可以更安全、更简
2. 拉取新版本镜像

```bash
podman pull registry.fit2cloud.com/halo/halo:2.18
podman pull registry.fit2cloud.com/halo/halo:2.19
```

3. 停止运行中的容器
Expand All @@ -101,7 +101,7 @@ Podman 采用无守护进程的包容性架构,因此可以更安全、更简
修改版本号后,按照最初安装的方式,重新创建容器即可。

```bash
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.18
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.19
```

## 使用 [Podman Quadlet](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html)
Expand Down Expand Up @@ -137,7 +137,7 @@ Environment=SPRING_CONFIG_LOCATION="optional:classpath:/;optional:file:/.halo/"
Environment=TZ=Asia/Shanghai
Volume=/opt/podman-data/halo:/.halo
PublishPort=127.0.0.1:8090:8090
Image=ghcr.io/halo-dev/halo:2.18
Image=ghcr.io/halo-dev/halo:2.19
Exec=--halo.external-url=https://localhost:8090 --spring.sql.init.platform=postgresql --spring.r2dbc.url=r2dbc:pool:postgresql://127.0.0.1:5432/my-db --spring.r2dbc.username=my-user --spring.r2dbc.password=my-password

[Service]
Expand Down Expand Up @@ -166,7 +166,7 @@ Podman Quadlet 解析:

`[Container]` 部分:

- `AutoUpdate=registry`指定了自动拉取容器。假设后续Halo镜像支持了`latest`标签,你需要`systemctl enable --now podman-auto-update.timer`以启用容器自动更新。本文示例`ghcr.io/halo-dev/halo:2.18`,将会自动更新适用与`2.18`版本的patch,例如您创建容器时是`2.18.1`,在官方发布`2.18.2`版本时,容器会自动更新到`2.18.2`。
- `AutoUpdate=registry`指定了自动拉取容器。假设后续Halo镜像支持了`latest`标签,你需要`systemctl enable --now podman-auto-update.timer`以启用容器自动更新。本文示例`ghcr.io/halo-dev/halo:2.19`,将会自动更新适用与`2.19`版本的patch,例如您创建容器时是`2.19.1`,在官方发布`2.19.2`版本时,容器会自动更新到`2.19.2`。
- `ContainerName=`指定了 systemd 将生成的服务名称。
- `User=60000 Group=60000 UserNS=keep-id:uid=60000,gid=60000` 限制容器以 id 60000 的用户运行,提高安全性。注意这个id 60000请根据你实际想要运行的用户名来修改,可通过`id user`获得你的用户的id.
- `Environment=`字段指定了容器的环境变量,其中你需要注意的是`Environment=HALO_WORK_DIR="/.halo"` `Environment=SPRING_CONFIG_LOCATION="optional:classpath:/;optional:file:/.halo/"`这两个变量中的`/.halo`路径。
Expand Down Expand Up @@ -209,7 +209,7 @@ AutoUpdate=registry
ContainerName=halo
Volume=/opt/podman-data/halo:/root/.halo
PublishPort=127.0.0.1:8090:8090
Image=ghcr.io/halo-dev/halo:2.18
Image=ghcr.io/halo-dev/halo:2.19
Exec=--halo.external-url=https://localhost:8090 --spring.sql.init.platform=postgresql --spring.r2dbc.url=r2dbc:pool:postgresql://127.0.0.1:5432/my-db --spring.r2dbc.username=my-user --spring.r2dbc.password=my-password

[Service]
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/install/slots/_docker-registry-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
- [ghcr.io/halo-dev/halo](https://github.com/halo-dev/halo/pkgs/container/halo)

:::info 注意
目前 Halo 2 并未更新 Docker 的 latest 标签镜像,主要因为 Halo 2 不兼容 1.x 版本,防止使用者误操作。我们推荐使用固定版本的标签,比如 `2.18` 或者 `2.18.0`。
目前 Halo 2 并未更新 Docker 的 latest 标签镜像,主要因为 Halo 2 不兼容 1.x 版本,防止使用者误操作。我们推荐使用固定版本的标签,比如 `2.19` 或者 `2.19.0`。

- `registry.fit2cloud.com/halo/halo:2`:表示最新的 2.x 版本,即每次发布新版本都会更新此镜像。
- `registry.fit2cloud.com/halo/halo:2.18`:表示最新的 2.18.x 版本,即每次发布 patch 版本都会同时更新此镜像。
- `registry.fit2cloud.com/halo/halo:2.18.0`:表示一个具体的版本。
- `registry.fit2cloud.com/halo/halo:2.19`:表示最新的 2.19.x 版本,即每次发布 patch 版本都会同时更新此镜像。
- `registry.fit2cloud.com/halo/halo:2.19.0`:表示一个具体的版本。

后续文档以 `registry.fit2cloud.com/halo/halo:2.18` 为例。
后续文档以 `registry.fit2cloud.com/halo/halo:2.19` 为例。
:::
2 changes: 1 addition & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ slug: /
## 快速开始

```bash
docker run -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 halohub/halo:2.18
docker run -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 halohub/halo:2.19
```

以上仅作为体验使用,详细部署文档请查阅:[https://docs.halo.run/getting-started/install/docker-compose](https://docs.halo.run/getting-started/install/docker-compose)
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ server {
--name halo-1 \
-p 8090:8090 \
-v ~/.halo2:/root/.halo2 \
registry.fit2cloud.com/halo/halo:2.18 \
registry.fit2cloud.com/halo/halo:2.19 \

# 第二个 Halo 容器
docker run \
-it -d \
--name halo-2 \
-p 8091:8090 \
-v ~/.halo2_2:/root/.halo2 \
registry.fit2cloud.com/halo/halo:2.18 \
registry.fit2cloud.com/halo/halo:2.19 \
```

更多 Docker 相关的教程请参考:[使用 Docker 部署 Halo](../getting-started/install/docker.md)
Expand Down
49 changes: 26 additions & 23 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ const config = {
routeBasePath: "/",
showLastUpdateTime: true,
showLastUpdateAuthor: true,
lastVersion: "2.18",
lastVersion: "2.19",
versions: {
current: {
label: "2.19.0-SNAPSHOT",
path: "2.19.0-SNAPSHOT",
label: "2.20.0-SNAPSHOT",
path: "2.20.0-SNAPSHOT",
},
},
},
Expand All @@ -44,13 +44,15 @@ const config = {
changefreq: "weekly",
priority: 0.5,
ignorePatterns: [
"/2.0/**",
"/2.1/**",
"/2.2/**",
"/2.3/**",
"/2.4/**",
"/2.5/**",
"/2.6/**",
"/2.10/**",
"/2.11/**",
"/2.12/**",
"/2.13/**",
"/2.14/**",
"/2.15/**",
"/2.16/**",
"/2.17/**",
"/2.18/**",
],
},
googleAnalytics: {
Expand Down Expand Up @@ -147,11 +149,11 @@ const config = {
items: [
{
label: "官网",
href: "https://halo.run",
href: "https://www.halo.run",
},
{
label: "应用市场",
href: "https://halo.run/store/apps",
href: "https://www.halo.run/store/apps",
},
{
label: "GitHub 组织",
Expand All @@ -176,7 +178,7 @@ const config = {
},
{
label: "微信公众号",
href: "https://halo.run/upload/2021/03/B3C27F16-4890-4633-81CC-20BA4B28F94F-2415126255c749b290312ca22d9bdeb0.jpeg",
href: "https://www.halo.run/upload/2021/03/B3C27F16-4890-4633-81CC-20BA4B28F94F-2415126255c749b290312ca22d9bdeb0.jpeg",
},
{
label: "GitHub Issues",
Expand Down Expand Up @@ -235,17 +237,18 @@ const config = {
},
],
createRedirects(existingPath) {
if (existingPath.startsWith("/2.19.0-SNAPSHOT/")) {
if (existingPath.startsWith("/2.20.0-SNAPSHOT/")) {
return [
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.10.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.11.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.12.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.13.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.14.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.15.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.16.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.17.0-SNAPSHOT/"),
existingPath.replace("/2.19.0-SNAPSHOT/", "/2.18.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.10.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.11.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.12.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.13.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.14.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.15.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.16.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.17.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.18.0-SNAPSHOT/"),
existingPath.replace("/2.20.0-SNAPSHOT/", "/2.19.0-SNAPSHOT/"),
];
}
return undefined;
Expand Down
Loading