✨ 🎨 Upgrade Hugo min version is 134 & add read more feature
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
{{/* Use to defind global variables */}}
|
||||
|
||||
{{ $version := int (index (split hugo.Version ".") 1) }}
|
||||
{{ if lt $version 89 }}
|
||||
{{ warnf "当前 Hugo 版本小于 0.89.0,请到官方地址下载 Hugo 最新版本:https://github.com/gohugoio/hugo/releases" }}
|
||||
{{ errorf "Current Hugo version is less then 0.89.0, Please download Hugo latest version on offical site: https://github.com/gohugoio/hugo/releases" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $majorVer := int (index (split hugo.Version ".") 1) }}
|
||||
{{ if lt $majorVer 134 }}
|
||||
{{ errorf "当前 Hugo 版本为 %s 小于 0.134.0,请到官方地址下载 Hugo 最新版本:https://github.com/gohugoio/hugo/releases" hugo.Version }}
|
||||
{{ errorf "Current Hugo version is %s less then 0.134.0, Please download the Hugo latest version from offical site: https://github.com/gohugoio/hugo/releases" hugo.Version }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not hugo.IsExtended }}
|
||||
{{ warnf "Hugo NexT 主题使用了 SCSS 框架,请到官方地址下载 Hugo Extended 版本:https://github.com/gohugoio/hugo/releases" }}
|
||||
{{ errorf "Because that use SCSS framework in Hugo NexT, Please download Hugo extended version on offical site: https://github.com/gohugoio/hugo/releases" }}
|
||||
{{ errorf "Hugo NexT 主题使用了 SCSS 框架,请到官方地址下载 Hugo Extended 版本:https://github.com/gohugoio/hugo/releases" }}
|
||||
{{ errorf "Because that use SCSS framework in Hugo NexT, Please download the Hugo extended version from offical site: https://github.com/gohugoio/hugo/releases" }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ $globalVars := newScratch }}
|
||||
|
||||
{{ $pages := (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||
|
||||
Reference in New Issue
Block a user