🔧 Re Change default section display not use archive page.
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
{{/* Use to defind global variables */}}
|
||||
|
||||
{{ 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" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $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" }}
|
||||
{{ 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 }}
|
||||
|
||||
{{ 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" }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ $globalVars := newScratch }}
|
||||
|
||||
{{ $globalVars.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) }}
|
||||
{{ range .Site.Params.mainSections }}
|
||||
{{ $globalVars.Set . (len (where $.Page.Site.RegularPages "Section" .))}}
|
||||
{{ end }}
|
||||
{{ $globalVars.Set "catsCount" (len .Site.Taxonomies.categories) }}
|
||||
{{ $globalVars.Set "tagsCount" (len .Site.Taxonomies.tags) }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user