2023-07-27 14:14:55 +00:00
|
|
|
{{- $page := .page }}
|
|
|
|
{{- if and (not $page) .context }}
|
|
|
|
{{- $page = .context }}
|
2023-11-20 23:53:33 +00:00
|
|
|
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'siteparam' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
|
2023-07-27 14:14:55 +00:00
|
|
|
{{- end }}
|
2023-07-26 20:29:03 +00:00
|
|
|
{{- $paramNames := split .name "." }}
|
2023-07-27 14:14:55 +00:00
|
|
|
{{- with $page }}
|
2023-07-26 20:29:03 +00:00
|
|
|
{{- $params := .Site.Params }}
|
|
|
|
{{- range $paramName := $paramNames }}
|
|
|
|
{{- with $params }}
|
|
|
|
{{- $params = index . (lower $paramName) }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2023-09-21 19:34:02 +00:00
|
|
|
{{- with $params }}
|
|
|
|
{{- . }}
|
2023-08-12 11:13:03 +00:00
|
|
|
{{- end }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- end }}
|