hugo/tpl/tplimpl/embedded/templates/shortcodes/param.html

4 lines
223 B
HTML
Raw Normal View History

2018-11-27 15:53:11 +00:00
{{- $name := (.Get 0) -}}
{{- with $name -}}
{{- with ($.Page.Param .) }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}}
{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}}