2023-07-27 14:14:55 +00:00
|
|
|
{{- $page := .page }}
|
|
|
|
{{- if and (not $page) .context }}
|
|
|
|
{{- $page = .context }}
|
|
|
|
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'siteparam' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180-2023-07-27" $page.File.Path }}
|
|
|
|
{{- 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-07-26 20:29:03 +00:00
|
|
|
{{- $params | .RenderString }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- end }}
|