1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 05:03:16 +02:00

docs: backport layouts updates from the main branch

This commit is contained in:
XhmikosR
2021-09-08 09:16:38 +03:00
parent 9cdfbc06ce
commit b0cd2078f7
9 changed files with 34 additions and 30 deletions

View File

@@ -1,11 +1,13 @@
{{- /*
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 in $name "_hash" -}}
{{- /* 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 -}}