Skip to content

Commit

Permalink
raise minimal hugo version
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Jan 17, 2025
1 parent 6d5ea0e commit 9bf0f02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/init.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- .Scratch.Set "version" "0.4.0" -}}

{{- /* Check Hugo version */ -}}
{{- $OLDEST_SUPPORTED_HUGO_VERSION := "0.134.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 -}}
{{- $MINIMAL_HUGO_VERSION := "0.141.0" -}}
{{- if lt hugo.Version $MINIMAL_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 $MINIMAL_HUGO_VERSION hugo.Version $MINIMAL_HUGO_VERSION -}}
{{- end -}}

{{- /* Check Hugo extend */ -}}
Expand Down

0 comments on commit 9bf0f02

Please sign in to comment.