From d07497d2fcceb45ecf5bbc50efdaef26bec86d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Mon, 4 Dec 2023 18:03:53 +0100 Subject: [PATCH] variant: restore storage of nested variants #679 --- layouts/partials/get-theme-variants.hugo | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layouts/partials/get-theme-variants.hugo b/layouts/partials/get-theme-variants.hugo index 402d045255..8e29d70f77 100644 --- a/layouts/partials/get-theme-variants.hugo +++ b/layouts/partials/get-theme-variants.hugo @@ -50,8 +50,6 @@ Non-auto run {{- $themevariant := $tempthemevariant }} {{- if not (collections.IsSet $themevariant "auto") }} {{- $themevariant = partial "get-theme-details.html" (dict "themevariant" $themevariant "identifier" $themevariant.identifier "mod" $mod)}} - {{- $cssres := $themevariant.themecontent | resources.FromString (printf "css/theme-%s%s.css" $themevariant.identifier $mod) }} - {{- /* the following code causes Hugo to generate our css file - although it is in comments */}} {{- end }} {{- $themevariants = $themevariants | append $themevariant }} {{- end }} @@ -145,7 +143,8 @@ Auto run {{- end }} {{- $themecontent = replaceRE `(:root\s*\{[ \t]*)(\s*)` (printf "${1}${2}--CODE-theme: %s;${2}" $chroma) $themecontent }} {{- end }} - {{- $themevariant = collections.Merge $themevariant (dict "themecontent" $themecontent) }} {{- $themevariant = collections.Merge $themevariant (dict "chroma" $chroma) }} + {{- $cssres := $themecontent | resources.FromString (printf "css/theme-%s%s.css" $identifier $mod) }} + {{- /* the following code causes Hugo to generate our css file - although it is in comments */}} {{- return $themevariant }} {{- end }} \ No newline at end of file