Skip to content

Commit

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

/kind documentation

```release-note
None
```
  • Loading branch information
ruibaby authored Oct 14, 2024
1 parent f752dd7 commit 9876911
Show file tree
Hide file tree
Showing 185 changed files with 15,652 additions and 58 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.19.0`
构建之前需要修改 `gradle.properties` 中的 `version` 属性(推荐遵循 [SemVer 规范](https://semver.org/)),例如:`version=2.20.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.19
image: registry.fit2cloud.com/halo/halo:2.20
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.19
image: registry.fit2cloud.com/halo/halo:2.20
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.19
image: registry.fit2cloud.com/halo/halo:2.20
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.19
image: registry.fit2cloud.com/halo/halo:2.20
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.19
image: registry.fit2cloud.com/halo/halo:2.20
```

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

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

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

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

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

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

## 使用 [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.19
Image=ghcr.io/halo-dev/halo:2.20
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.19`,将会自动更新适用与`2.19`版本的patch,例如您创建容器时是`2.19.1`,在官方发布`2.19.2`版本时,容器会自动更新到`2.19.2`
- `AutoUpdate=registry`指定了自动拉取容器。假设后续Halo镜像支持了`latest`标签,你需要`systemctl enable --now podman-auto-update.timer`以启用容器自动更新。本文示例`ghcr.io/halo-dev/halo:2.20`,将会自动更新适用与`2.20`版本的patch,例如您创建容器时是`2.20.1`,在官方发布`2.20.2`版本时,容器会自动更新到`2.20.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.19
Image=ghcr.io/halo-dev/halo:2.20
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.19` 或者 `2.19.0`
目前 Halo 2 并未更新 Docker 的 latest 标签镜像,主要因为 Halo 2 不兼容 1.x 版本,防止使用者误操作。我们推荐使用固定版本的标签,比如 `2.20` 或者 `2.20.0`

- `registry.fit2cloud.com/halo/halo:2`:表示最新的 2.x 版本,即每次发布新版本都会更新此镜像。
- `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.20`:表示最新的 2.20.x 版本,即每次发布 patch 版本都会同时更新此镜像。
- `registry.fit2cloud.com/halo/halo:2.20.0`:表示一个具体的版本。

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

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

更多 Docker 相关的教程请参考:[使用 Docker 部署 Halo](../getting-started/install/docker.md)
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {
routeBasePath: "/",
showLastUpdateTime: true,
showLastUpdateAuthor: true,
lastVersion: "2.19",
lastVersion: "2.20",
versions: {
current: {
label: "2.20.0-SNAPSHOT",
Expand Down
62 changes: 31 additions & 31 deletions i18n/zh-Hans/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
"message": "页面已崩溃。",
"description": "The title of the fallback page when the page crashed"
},
"theme.blog.archive.title": {
"message": "历史博文",
"description": "The page & hero title of the blog archive page"
},
"theme.blog.archive.description": {
"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"
Expand All @@ -33,6 +25,14 @@
"message": "较旧的博文",
"description": "The label used to navigate to the older blog posts page (next page)"
},
"theme.blog.archive.title": {
"message": "历史博文",
"description": "The page & hero title of the blog archive page"
},
"theme.blog.archive.description": {
"message": "历史博文",
"description": "The page & hero description of the blog archive page"
},
"theme.blog.post.paginator.navAriaLabel": {
"message": "博文分页导航",
"description": "The ARIA label for the blog posts pagination"
Expand Down Expand Up @@ -120,6 +120,10 @@
"message": "编辑此页",
"description": "The link label to edit the current page"
},
"theme.common.headingLinkTitle": {
"message": "{heading}的直接链接",
"description": "Title for link to heading"
},
"theme.lastUpdated.atDate": {
"message": "于 {date} ",
"description": "The words used to describe on which date a page has been last updated"
Expand All @@ -132,18 +136,14 @@
"message": "最后{byUser}{atDate}更新",
"description": "The sentence used to display when a page has been last updated, and by who"
},
"theme.common.headingLinkTitle": {
"message": "{heading}的直接链接",
"description": "Title for link to heading"
"theme.navbar.mobileVersionsDropdown.label": {
"message": "选择版本",
"description": "The label for the navbar versions dropdown on mobile view"
},
"theme.NotFound.title": {
"message": "找不到页面",
"description": "The title of the 404 page"
},
"theme.navbar.mobileVersionsDropdown.label": {
"message": "选择版本",
"description": "The label for the navbar versions dropdown on mobile view"
},
"theme.tags.tagsListLabel": {
"message": "标签:",
"description": "The label alongside a tag list"
Expand Down Expand Up @@ -192,10 +192,6 @@
"message": "复制",
"description": "The copy button label on code blocks"
},
"theme.CodeBlock.wordWrapToggle": {
"message": "切换自动换行",
"description": "The title attribute for toggle word wrapping button of code block lines"
},
"theme.DocSidebarItem.expandCategoryAriaLabel": {
"message": "展开侧边栏分类 '{label}'",
"description": "The ARIA label to expand the sidebar category"
Expand All @@ -204,10 +200,18 @@
"message": "折叠侧边栏分类 '{label}'",
"description": "The ARIA label to collapse the sidebar category"
},
"theme.CodeBlock.wordWrapToggle": {
"message": "切换自动换行",
"description": "The title attribute for toggle word wrapping button of code block lines"
},
"theme.NavBar.navAriaLabel": {
"message": "主导航",
"description": "The ARIA label for the main navigation"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "选择语言",
"description": "The label for the mobile language switcher dropdown"
},
"theme.NotFound.p1": {
"message": "我们找不到您要找的页面。",
"description": "The first paragraph of the 404 page"
Expand All @@ -232,6 +236,10 @@
"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"
},
"theme.docs.sidebar.navAriaLabel": {
"message": "文档侧边栏",
"description": "The ARIA label for the sidebar navigation"
Expand All @@ -244,18 +252,14 @@
"message": "收起侧边栏",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.breadcrumbs.home": {
"message": "主页面",
"description": "The ARIA label for the home page in the breadcrumbs"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "选择语言",
"description": "The label for the mobile language switcher dropdown"
},
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
"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.closeSidebarButtonAriaLabel": {
"message": "关闭导航栏",
"description": "The ARIA label for close button of mobile sidebar"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "展开侧边栏",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
Expand All @@ -264,10 +268,6 @@
"message": "展开侧边栏",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
"message": "关闭导航栏",
"description": "The ARIA label for close button of mobile sidebar"
},
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
"message": "切换导航栏",
"description": "The ARIA label for hamburger menu button of mobile navigation"
Expand Down
Loading

0 comments on commit 9876911

Please sign in to comment.