mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
258093e2d5
currently only the additional name option is recognized
13 lines
No EOL
618 B
Text
13 lines
No EOL
618 B
Text
{{- $themevariants := slice }}
|
|
{{- $tempthemevariants := slice | append (.Site.Params.themeVariant | default "auto" ) }}
|
|
{{- range $tempthemevariant := $tempthemevariants }}
|
|
{{- $themevariant := $tempthemevariant }}
|
|
{{- if not (reflect.IsMap $themevariant) }}
|
|
{{- $themevariant = dict "identifier" $tempthemevariant }}
|
|
{{- end }}
|
|
{{- if not $themevariant.name }}
|
|
{{- $themevariant = collections.Merge $themevariant (dict "name" ($themevariant.identifier | humanize | strings.Title)) }}
|
|
{{- end }}
|
|
{{- $themevariants = $themevariants | append $themevariant }}
|
|
{{- end }}
|
|
{{- return $themevariants }} |