From 1119b3f9a6319f225668e1ba2aab6e75ace6f9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 26 Nov 2023 18:11:56 +0100 Subject: [PATCH] variant: cache variant config #679 --- layouts/partials/menu.html | 2 +- layouts/partials/stylesheet.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 06cb8097cf..6149cc10fd 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -58,7 +58,7 @@ {{- end }} {{- $siteLanguages := .Site.Languages }} {{- $showlangswitch := and .Site.IsMultiLingual (not .Site.Params.disableLanguageSwitchingButton) (gt (int (len $siteLanguages)) 1) }} - {{- $themevariants := partial "get-theme-variants.hugo" . }} + {{- $themevariants := partialCached "get-theme-variants.hugo" . }} {{- $showvariantswitch := gt (int (len $themevariants)) 1 }} {{- $footer := partial "menu-footer.html" . }} {{- $showfooter := not (eq 0 (int (len ($footer | plainify)))) }} diff --git a/layouts/partials/stylesheet.html b/layouts/partials/stylesheet.html index 16276ee4c6..eb904a106b 100644 --- a/layouts/partials/stylesheet.html +++ b/layouts/partials/stylesheet.html @@ -13,7 +13,7 @@ - {{- $themevariants := partial "get-theme-variants.hugo" . }} + {{- $themevariants := partialCached "get-theme-variants.hugo" . }} {{- with index $themevariants 0 }}