⚡ Improve site generate speed with use partialCached function.
This commit is contained in:
@@ -5,9 +5,14 @@
|
||||
{{- errorf "Because that use SCSS framework in Hugo NexT, Please download Hugo extended version on offical site: https://github.com/gohugoio/hugo/releases" -}}
|
||||
{{- end }}
|
||||
|
||||
{{- .Scratch.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) -}}
|
||||
{{- .Scratch.Set "catsCount" (len .Site.Taxonomies.categories) -}}
|
||||
{{- .Scratch.Set "tagsCount" (len .Site.Taxonomies.tags) -}}
|
||||
{{- $globalVars := newScratch -}}
|
||||
|
||||
{{- $globalVars.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) -}}
|
||||
{{- $globalVars.Set "catsCount" (len .Site.Taxonomies.categories) -}}
|
||||
{{- $globalVars.Set "tagsCount" (len .Site.Taxonomies.tags) -}}
|
||||
|
||||
{{- $vendor := .Site.Params.vendors.plugins -}}
|
||||
{{- $router := index .Site.Data.resources.vendors $vendor -}}
|
||||
{{- .Scratch.Set "router" $router -}}
|
||||
{{- $globalVars.Set "router" $router -}}
|
||||
|
||||
{{- return $globalVars.Values -}}
|
||||
|
||||
Reference in New Issue
Block a user