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

4 lines
223 B
HTML
Raw Permalink Normal View History

2018-11-27 10:53:11 -05: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 -}}