Skip to content

Commit

Permalink
chore: bump min hugo version requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Mar 28, 2024
1 parent bcf1b3d commit 69482cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Discover what the Hugo - **DoIt** theme is all about and the core-concepts behin

Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme.

Just install latest version of [{{< fa-icon regular file-archive >}} Hugo (> 0.83.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**).
Just install latest version of [{{< fa-icon regular file-archive >}} Hugo (> 0.122.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**).

{{< admonition note "Why not support earlier versions of Hugo?" >}}
Since [WebP Image Processing](https://gohugo.io/content-management/image-processing/#jpeg-and-webp-quality) was introduced in the [Hugo 0.83.0](https://gohugo.io/news/0.83.0-relnotes/), this theme only supports Hugo versions above **0.83.0**.
Since [WebP Image Processing](https://gohugo.io/content-management/image-processing/#jpeg-and-webp-quality) was introduced in the [Hugo 0.122.0](https://gohugo.io/news/0.122.0-relnotes/), this theme only supports Hugo versions above **0.122.0**.
{{< /admonition >}}

{{< admonition tip "Hugo extended version is recommended" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ toc:

由于 Hugo 提供的便利性, [Hugo](https://gohugo.io/) 本身是这个主题唯一的依赖.

直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [{{< fa-icon regular file-archive >}} Hugo (> 0.83.0)](https://gohugo.io/getting-started/installing/).
直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [{{< fa-icon regular file-archive >}} Hugo (> 0.122.0)](https://gohugo.io/getting-started/installing/).

{{< admonition note "为什么不支持早期版本的 Hugo?" >}}
由于 [WebP 图像处理](https://gohugo.io/content-management/image-processing/#jpeg-and-webp-quality)[Hugo 0.83.0版本](https://gohugo.io/news/0.83.0-relnotes/) 中被引入, 本主题只支持高于 **0.83.0** 的 Hugo 版本.
由于 [WebP 图像处理](https://gohugo.io/content-management/image-processing/#jpeg-and-webp-quality)[Hugo 0.122.0版本](https://gohugo.io/news/0.122.0-relnotes/) 中被引入, 本主题只支持高于 **0.122.0** 的 Hugo 版本.
{{< /admonition >}}

{{< admonition tip "推荐使用 Hugo extended 版本" >}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/init.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{{/* TODO: properly restore DoIt using semiVer */}}

{{- /* Check Hugo version */ -}}
{{- $OLDEST_SUPPORTED_HUGO_VERSION := "0.83.0" -}}
{{- if lt hugo.Version "0.83.0" -}}
{{- $OLDEST_SUPPORTED_HUGO_VERSION := "0.122.0" -}}
{{- if lt hugo.Version $OLDEST_SUPPORTED_HUGO_VERSION -}}
{{- errorf "\n\nHugo version is too low.\nHugo 版本过低。\n\nCurrent Hugo version is %v, the oldest supported version is %v.\n目前使用的 Hugo 版本为 %v, DoIt 支持的最老的 Hugo 版本为 %v。\n\nIf you are running Hugo on your own computer, check out https://gohugo.io/getting-started/installing/#upgrade-hugo for upgrading guide.\n如果你正在自己的计算机上运行 Hugo,请访问 https://gohugo.io/getting-started/installing/#upgrade-hugo 以查阅升级指南。\n\nIf you are deploying on a third-party platform, please configure Hugo version accordingly.\n如果你正在第三方平台上部署,请按照相应文档配置 Hugo 版本。\n\n" hugo.Version $OLDEST_SUPPORTED_HUGO_VERSION hugo.Version $OLDEST_SUPPORTED_HUGO_VERSION -}}
{{- end -}}

Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ features = [
[module]
[module.hugoVersion]
extended = true
min = "0.83.0"
min = "0.122.0"

0 comments on commit 69482cb

Please sign in to comment.