diff --git a/layouts/_partials/footer/scripts.html b/layouts/_partials/footer/scripts.html index eec17c324..a05fa18a0 100644 --- a/layouts/_partials/footer/scripts.html +++ b/layouts/_partials/footer/scripts.html @@ -40,7 +40,7 @@ {{- $destination = path.Join (path.Dir $destination) (printf "%s.%s%s" (path.BaseName $destination) $page.Language.Lang (path.Ext $destination)) -}} {{- end -}} - {{- $bundle := partial "utilities/bundlev2.html" (dict + {{- $bundle := partialCached "utilities/bundlev2.html" (dict "page" $page "match" $match "filename" $destination @@ -50,7 +50,7 @@ "skip-template" $skipTemplate "enable-template" $enableTemplate "debugging" site.Params.debugging.showJS - ) -}} + ) $destination (delimit $modules ",") -}} {{- $js := $bundle.bundle -}} {{- $jsmod := $bundle.module -}} diff --git a/layouts/_partials/head/head.html b/layouts/_partials/head/head.html index 7633b59e6..b6a7a41f2 100644 --- a/layouts/_partials/head/head.html +++ b/layouts/_partials/head/head.html @@ -1,5 +1,5 @@ {{ define "head" }} - {{- $version := strings.TrimSpace (partial "assets/version.html" .) -}} + {{- $version := strings.TrimSpace (partialCached "assets/version.html" . "version") -}} {{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}} diff --git a/layouts/_partials/head/stylesheet.html b/layouts/_partials/head/stylesheet.html index bbe1ffdd9..9e9364ec6 100644 --- a/layouts/_partials/head/stylesheet.html +++ b/layouts/_partials/head/stylesheet.html @@ -77,20 +77,20 @@ "enableSourceMap" (not hugo.IsProduction) "vars" $vars ) -}} -{{- $bundle := partial "utilities/bundlev2.html" (dict +{{- $bundle := partialCached "utilities/bundlev2.html" (dict "page" page "match" $source "filename" (printf "scss/bundle-%s.scss" (hash.XxHash $source)) "modules" $modules "basepath" "scss" "debugging" site.Params.debugging.showSCSS -) -}} +) $source page.Language.Lang (delimit $modules ",") -}} {{- if and (gt ($bundle.bundle.Content | len) 0) (not $error) }} {{- $css := $bundle.bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}} {{ if $core }} - {{- partial "head/icons.html" (dict "css" $css) -}} + {{- partialCached "head/icons.html" (dict "css" $css) ($css.Content | md5) -}} {{ end }} {{- if site.Params.style.purge -}} {{- $post_options := dict "config" "config" "noMap" hugo.IsProduction -}} diff --git a/layouts/tags/list.html b/layouts/tags/list.html index e38a7816f..e652c4241 100644 --- a/layouts/tags/list.html +++ b/layouts/tags/list.html @@ -40,7 +40,7 @@ {{ else }} {{ $dateFormat := default "Jan 2" (index .Site.Params "date_format") }} {{ $.Scratch.Set "lastYear" ""}} - {{ range .Pages }} + {{ range .Pages.ByDate.Reverse }} {{ $year := .Date.Year }} {{ $lastYear := $.Scratch.Get "lastYear"}} {{- $title := .Title }}