mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
12 lines
No EOL
556 B
HTML
12 lines
No EOL
556 B
HTML
{{- $page := .page }}
|
|
{{- $location := .location }}
|
|
{{- $outputFormat := .outputFormat }}
|
|
{{- range $k, $v := $page.Site.Params.relearn.dependencies }}
|
|
{{- $has := printf "has%s" $v.name }}
|
|
{{- $nestedhas := printf "nestedHas%s" $v.name }}
|
|
{{- $wants := or ($page.Page.Store.Get $has) (and ($page.Page.Store.Get (printf "%sIsNested" $outputFormat)) ($page.Page.Store.Get $nestedhas)) }}
|
|
{{- if and $wants (eq $location $v.location) }}
|
|
{{- $dep := printf "dependencies/%s.html" $k }}
|
|
{{- partial $dep (dict "page" $page) }}
|
|
{{- end }}
|
|
{{- end }} |