Adding upstream version 5.2.3+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b80f12a01d
commit
bc475d7d0d
617 changed files with 89471 additions and 0 deletions
14
site/layouts/shortcodes/param.html
Normal file
14
site/layouts/shortcodes/param.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{- /*
|
||||
Work around wrong escapes in integrity attributes.
|
||||
Original: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/param.html
|
||||
*/ -}}
|
||||
|
||||
{{- $name := .Get 0 -}}
|
||||
{{- with $name -}}
|
||||
{{- $value := $.Page.Param . -}}
|
||||
{{- /* If any parameter ends with `_hash`, mark the string as safe HTML */ -}}
|
||||
{{- if (strings.HasSuffix $name "_hash") -}}
|
||||
{{- $value = $value | safeHTML -}}
|
||||
{{- end -}}
|
||||
{{- with $value }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}}
|
||||
{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}}
|
Loading…
Add table
Add a link
Reference in a new issue