hugo-theme-relearn/layouts/partials/_relearn/dependencies.gotmpl
2024-10-11 16:45:43 +02:00

8 lines
No EOL
377 B
Go Template

{{- range .Site.Params.relearn.dependencies }}
{{- $has := printf "has%s" .name }}
{{- $disable := printf "disable%s" .name }}
{{- $wants := or (and (ne (index $.Params $disable) nil) (not (index $.Params $disable))) (and (ne (index $.Site.Params $disable) nil) (not (index $.Site.Params $disable))) }}
{{- if $wants }}
{{- $.Store.Set $has true }}
{{- end }}
{{- end }}