mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
variant: restore storage of nested variants #679
This commit is contained in:
parent
edf50b44fe
commit
d07497d2fc
1 changed files with 2 additions and 3 deletions
|
@ -50,8 +50,6 @@ Non-auto run
|
||||||
{{- $themevariant := $tempthemevariant }}
|
{{- $themevariant := $tempthemevariant }}
|
||||||
{{- if not (collections.IsSet $themevariant "auto") }}
|
{{- if not (collections.IsSet $themevariant "auto") }}
|
||||||
{{- $themevariant = partial "get-theme-details.html" (dict "themevariant" $themevariant "identifier" $themevariant.identifier "mod" $mod)}}
|
{{- $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 */}}<!-- {{ $cssres.RelPermalink }} -->
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $themevariants = $themevariants | append $themevariant }}
|
{{- $themevariants = $themevariants | append $themevariant }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -145,7 +143,8 @@ Auto run
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $themecontent = replaceRE `(:root\s*\{[ \t]*)(\s*)` (printf "${1}${2}--CODE-theme: %s;${2}" $chroma) $themecontent }}
|
{{- $themecontent = replaceRE `(:root\s*\{[ \t]*)(\s*)` (printf "${1}${2}--CODE-theme: %s;${2}" $chroma) $themecontent }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $themevariant = collections.Merge $themevariant (dict "themecontent" $themecontent) }}
|
|
||||||
{{- $themevariant = collections.Merge $themevariant (dict "chroma" $chroma) }}
|
{{- $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 */}}<!-- {{ $cssres.RelPermalink }} -->
|
||||||
{{- return $themevariant }}
|
{{- return $themevariant }}
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue