From 69482cb82570ab30c698ec32858295f4d8dd2cf2 Mon Sep 17 00:00:00 2001 From: HEIGE-PCloud Date: Thu, 28 Mar 2024 23:16:44 +0000 Subject: [PATCH] chore: bump min hugo version requirement --- .../content/posts/theme-documentation-basics/index.en.md | 4 ++-- .../content/posts/theme-documentation-basics/index.zh-cn.md | 4 ++-- layouts/partials/init.html | 4 ++-- theme.toml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 00f5aca1f..2b50d17a3 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -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" >}} diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index abfe8c91a..a35ff818d 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -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 版本" >}} diff --git a/layouts/partials/init.html b/layouts/partials/init.html index 16615bbb9..d23d7c836 100644 --- a/layouts/partials/init.html +++ b/layouts/partials/init.html @@ -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 -}} diff --git a/theme.toml b/theme.toml index bc3e98237..188e5ebc0 100644 --- a/theme.toml +++ b/theme.toml @@ -36,4 +36,4 @@ features = [ [module] [module.hugoVersion] extended = true - min = "0.83.0" + min = "0.122.0"