mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
tpl/tplimpl: Update youtube shortcode
Pass a map instead of a slice to the collections.Querify function.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
1e34e5b26d
commit
852d868549
@@ -84,12 +84,7 @@ Renders an embedded YouTube video.
|
||||
{{- if $loop }}
|
||||
{{- $params = merge $params (dict "playlist" $id) }}
|
||||
{{- end }}
|
||||
{{- $s := slice }}
|
||||
{{- range $k, $v := $params }}
|
||||
{{- $s = $s | append $k }}
|
||||
{{- $s = $s | append $v }}
|
||||
{{- end }}
|
||||
{{- with querify $s }}
|
||||
{{- with querify $params }}
|
||||
{{- $src = printf "%s?%s" $src . }}
|
||||
{{- end }}
|
||||
|
||||
|
Reference in New Issue
Block a user