2023-07-27 16:14:55 +02:00
|
|
|
{{- $page := .page }}
|
|
|
|
{{- if and (not $page) .context }}
|
|
|
|
{{- $page = .context }}
|
2023-11-21 00:53:33 +01: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 16:14:55 +02:00
|
|
|
{{- end }}
|
2023-07-26 22:29:03 +02:00
|
|
|
{{- $paramNames := split .name "." }}
|
2023-07-27 16:14:55 +02:00
|
|
|
{{- with $page }}
|
2023-07-26 22:29:03 +02:00
|
|
|
{{- $params := .Site.Params }}
|
|
|
|
{{- range $paramName := $paramNames }}
|
|
|
|
{{- with $params }}
|
|
|
|
{{- $params = index . (lower $paramName) }}
|
2022-06-22 20:32:18 +02:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2023-09-21 21:34:02 +02:00
|
|
|
{{- with $params }}
|
|
|
|
{{- . }}
|
2023-08-12 13:13:03 +02:00
|
|
|
{{- end }}
|
2022-06-22 20:32:18 +02:00
|
|
|
{{- end }}
|