Skip to content

Commit

Permalink
docs: update documentation for Halo 2.17 (#378)
Browse files Browse the repository at this point in the history
为 [Halo 2.17](https://github.com/halo-dev/halo/releases/tag/v2.17.0) 更新文档。

/kind documentation

```release-note
None
```
  • Loading branch information
ruibaby committed Jul 2, 2024
1 parent d61ebe4 commit 9d868fa
Show file tree
Hide file tree
Showing 173 changed files with 14,330 additions and 73 deletions.
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.16.0`
构建之前需要修改 `gradle.properties` 中的 `version` 属性(推荐遵循 [SemVer 规范](https://semver.org/)),例如:`version=2.17.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 @@ -48,7 +48,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
services:
halo:
image: registry.fit2cloud.com/halo/halo:2.16
image: registry.fit2cloud.com/halo/halo:2.17
restart: on-failure:3
depends_on:
halodb:
Expand Down Expand Up @@ -106,7 +106,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
services:
halo:
image: registry.fit2cloud.com/halo/halo:2.16
image: registry.fit2cloud.com/halo/halo:2.17
restart: on-failure:3
depends_on:
halodb:
Expand Down Expand Up @@ -174,7 +174,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
services:
halo:
image: registry.fit2cloud.com/halo/halo:2.16
image: registry.fit2cloud.com/halo/halo:2.17
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.16
image: registry.fit2cloud.com/halo/halo:2.17
restart: on-failure:3
network_mode: "host"
volumes:
Expand Down Expand Up @@ -247,7 +247,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md"
```yaml {3}
services:
halo:
image: registry.fit2cloud.com/halo/halo:2.16
image: registry.fit2cloud.com/halo/halo:2.17
```

```bash
Expand Down Expand Up @@ -311,7 +311,7 @@ networks:
services:
halo:
image: registry.fit2cloud.com/halo/halo:2.16
image: registry.fit2cloud.com/halo/halo:2.17
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.16
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.17
```

:::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.16
docker pull registry.fit2cloud.com/halo/halo:2.17
```

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.16
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.17
```
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.16.0.jar -O halo.jar
wget https://dl.halo.run/release/halo-2.17.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.16.0.jar -O /home/halo/app/halo.jar
wget https://dl.halo.run/release/halo-2.17.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.16
image: registry.fit2cloud.com/halo/halo:2.17
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.16
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.17
```

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

```bash
podman pull registry.fit2cloud.com/halo/halo:2.16
podman pull registry.fit2cloud.com/halo/halo:2.17
```

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.16
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 registry.fit2cloud.com/halo/halo:2.17
```

## 使用 [Podman Quadlet](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html)
Expand Down Expand Up @@ -137,7 +137,7 @@ Podman 没有和 Docker 类似的管理进程,在低配置的主机上更友
Environment=TZ=Asia/Shanghai
Volume=/opt/podman-data/halo:/.halo
PublishPort=127.0.0.1:8090:8090
Image=ghcr.io/halo-dev/halo:2.16
Image=ghcr.io/halo-dev/halo:2.17
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.16`,将会自动更新适用与`2.16`版本的patch,例如您创建容器时是`2.16.1`,在官方发布`2.16.2`版本时,容器会自动更新到`2.16.2`
- `AutoUpdate=registry`指定了自动拉取容器。假设后续Halo镜像支持了`latest`标签,你需要`systemctl enable --now podman-auto-update.timer`以启用容器自动更新。本文示例`ghcr.io/halo-dev/halo:2.17`,将会自动更新适用与`2.17`版本的patch,例如您创建容器时是`2.17.1`,在官方发布`2.17.2`版本时,容器会自动更新到`2.17.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 @@ Podman Quadlet 解析:
ContainerName=halo
Volume=/opt/podman-data/halo:/root/.halo
PublishPort=127.0.0.1:8090:8090
Image=ghcr.io/halo-dev/halo:2.16
Image=ghcr.io/halo-dev/halo:2.17
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.16` 或者 `2.16.0`
目前 Halo 2 并未更新 Docker 的 latest 标签镜像,主要因为 Halo 2 不兼容 1.x 版本,防止使用者误操作。我们推荐使用固定版本的标签,比如 `2.17` 或者 `2.17.0`

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

后续文档以 `registry.fit2cloud.com/halo/halo:2.16` 为例。
后续文档以 `registry.fit2cloud.com/halo/halo:2.17` 为例。
:::
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.16
docker run -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 halohub/halo:2.17
```

以上仅作为体验使用,详细部署文档请查阅:<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.16 \
registry.fit2cloud.com/halo/halo:2.17 \
# 第二个 Halo 容器
docker run \
-it -d \
--name halo-2 \
-p 8091:8090 \
-v ~/.halo2_2:/root/.halo2 \
registry.fit2cloud.com/halo/halo:2.16 \
registry.fit2cloud.com/halo/halo:2.17 \
```

更多 Docker 相关的教程请参考:[使用 Docker 部署 Halo](../getting-started/install/docker.md)
Expand Down
23 changes: 12 additions & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ const config = {
routeBasePath: "/",
showLastUpdateTime: true,
showLastUpdateAuthor: true,
lastVersion: "2.16",
lastVersion: "2.17",
versions: {
current: {
label: "2.17.0-SNAPSHOT",
path: "2.17.0-SNAPSHOT",
label: "2.18.0-SNAPSHOT",
path: "2.18.0-SNAPSHOT",
},
},
},
Expand Down Expand Up @@ -234,15 +234,16 @@ const config = {
},
],
createRedirects(existingPath) {
if (existingPath.startsWith("/2.17.0-SNAPSHOT/")) {
if (existingPath.startsWith("/2.18.0-SNAPSHOT/")) {
return [
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.10.0-SNAPSHOT/"),
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.11.0-SNAPSHOT/"),
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.12.0-SNAPSHOT/"),
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.13.0-SNAPSHOT/"),
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.14.0-SNAPSHOT/"),
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.15.0-SNAPSHOT/"),
existingPath.replace("/2.17.0-SNAPSHOT/", "/2.16.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.10.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.11.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.12.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.13.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.14.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.15.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.16.0-SNAPSHOT/"),
existingPath.replace("/2.18.0-SNAPSHOT/", "/2.17.0-SNAPSHOT/"),
];
}
return undefined;
Expand Down
70 changes: 35 additions & 35 deletions i18n/zh-Hans/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
"message": "警告",
"description": "The default label used for the Caution admonition (:::caution)"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "回到顶部",
"description": "The ARIA label for the back to top button"
},
"theme.blog.archive.title": {
"message": "历史博文",
"description": "The page & hero title of the blog archive page"
Expand All @@ -53,6 +49,10 @@
"message": "历史博文",
"description": "The page & hero description of the blog archive page"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "回到顶部",
"description": "The ARIA label for the back to top button"
},
"theme.blog.paginator.navAriaLabel": {
"message": "博文列表分页导航",
"description": "The ARIA label for the blog pagination"
Expand All @@ -77,18 +77,6 @@
"message": "较旧一篇",
"description": "The blog post button label to navigate to the older/next post"
},
"theme.blog.post.plurals": {
"message": "{count} 篇博文",
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.tagTitle": {
"message": "{nPosts} 含有标签「{tagName}」",
"description": "The title of the page for a blog tag"
},
"theme.tags.tagsPageLink": {
"message": "查看所有标签",
"description": "The label of the link targeting the tag list page"
},
"theme.colorToggle.ariaLabel": {
"message": "切换浅色/暗黑模式(当前为{mode})",
"description": "The ARIA label for the navbar color mode toggle"
Expand All @@ -101,14 +89,26 @@
"message": "浅色模式",
"description": "The name for the light color mode"
},
"theme.docs.breadcrumbs.navAriaLabel": {
"message": "页面路径",
"description": "The ARIA label for the breadcrumbs"
"theme.blog.post.plurals": {
"message": "{count} 篇博文",
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.tagTitle": {
"message": "{nPosts} 含有标签「{tagName}」",
"description": "The title of the page for a blog tag"
},
"theme.tags.tagsPageLink": {
"message": "查看所有标签",
"description": "The label of the link targeting the tag list page"
},
"theme.docs.DocCard.categoryDescription": {
"message": "{count} 个项目",
"description": "The default description for a category card in the generated index about how many items this category includes"
},
"theme.docs.breadcrumbs.navAriaLabel": {
"message": "页面路径",
"description": "The ARIA label for the breadcrumbs"
},
"theme.docs.paginator.navAriaLabel": {
"message": "文件选项卡",
"description": "The ARIA label for the docs pagination"
Expand Down Expand Up @@ -176,14 +176,14 @@
"message": "标签:",
"description": "The label alongside a tag list"
},
"theme.blog.sidebar.navAriaLabel": {
"message": "最近博文导航",
"description": "The ARIA label for recent posts in the blog sidebar"
},
"theme.AnnouncementBar.closeButtonAriaLabel": {
"message": "关闭",
"description": "The ARIA label for close button of announcement bar"
},
"theme.blog.sidebar.navAriaLabel": {
"message": "最近博文导航",
"description": "The ARIA label for recent posts in the blog sidebar"
},
"theme.CodeBlock.copied": {
"message": "复制成功",
"description": "The copied button label on code blocks"
Expand Down Expand Up @@ -212,6 +212,14 @@
"message": "本页总览",
"description": "The label used by the button on the collapsible TOC component"
},
"theme.blog.post.readingTime.plurals": {
"message": "阅读需 {readingTime} 分钟",
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "选择语言",
"description": "The label for the mobile language switcher dropdown"
},
"theme.blog.post.readMore": {
"message": "阅读更多",
"description": "The label used in blog post item excerpts to link to full blog posts"
Expand All @@ -220,14 +228,6 @@
"message": "阅读 {title} 的全文",
"description": "The ARIA label for the link to full blog posts from excerpts"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "选择语言",
"description": "The label for the mobile language switcher dropdown"
},
"theme.blog.post.readingTime.plurals": {
"message": "阅读需 {readingTime} 分钟",
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.docs.breadcrumbs.home": {
"message": "主页面",
"description": "The ARIA label for the home page in the breadcrumbs"
Expand All @@ -252,10 +252,6 @@
"message": "← 回到主菜单",
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
},
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
"message": "切换导航栏",
"description": "The ARIA label for hamburger menu button of mobile navigation"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "展开侧边栏",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
Expand All @@ -264,6 +260,10 @@
"message": "展开侧边栏",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
"message": "切换导航栏",
"description": "The ARIA label for hamburger menu button of mobile navigation"
},
"theme.ErrorPageContent.tryAgain": {
"message": "重试",
"description": "The label of the button to try again rendering when the React error boundary captures an error"
Expand Down
Loading

0 comments on commit 9d868fa

Please sign in to comment.