First batch of day one
This commit is contained in:
12
themes/hugo-theme-relearn/layouts/partials/dependencies.html
Normal file
12
themes/hugo-theme-relearn/layouts/partials/dependencies.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- $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 }}
|
||||
Reference in New Issue
Block a user