{{- $page := .page }}
{{- $location := .location }}
{{- partialCached "_relearn/dependencies.gotmpl" $page $page.Path }}
{{- range $k, $v := $page.Site.Params.relearn.dependencies }}
	{{- $has := printf "has%s" $v.name }}
	{{- $hasnested := printf "relearnHasNested%s" $v.name }}
    {{- $wants := or ($page.Page.Store.Get $has) (and ($page.Page.Store.Get "relearnIsNested") ($page.Page.Store.Get $hasnested)) }}
	{{- if and $wants }}
		{{- if $v.location }}
			{{- warnf "DEPRECATED parameter 'location' for dependency '%s' configured in your hugo.toml, query the 'location' parameter inside your dependency loader instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/5/#5-27-0" $k}}
		{{- end }}
		{{- if or (not $v.location) (eq $location $v.location) }}
			{{- $dep := printf "dependencies/%s.html" $k }}
			{{- partial $dep (dict "page" $page "location" $location) }}
		{{- end }}
	{{- end }}
{{- end }}