tpl/tplimpl: Update youtube shortcode
Pass a map instead of a slice to the collections.Querify function.
This commit is contained in:
parent
1e34e5b26d
commit
852d868549
1 changed files with 1 additions and 6 deletions
|
@ -84,12 +84,7 @@ Renders an embedded YouTube video.
|
||||||
{{- if $loop }}
|
{{- if $loop }}
|
||||||
{{- $params = merge $params (dict "playlist" $id) }}
|
{{- $params = merge $params (dict "playlist" $id) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $s := slice }}
|
{{- with querify $params }}
|
||||||
{{- range $k, $v := $params }}
|
|
||||||
{{- $s = $s | append $k }}
|
|
||||||
{{- $s = $s | append $v }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with querify $s }}
|
|
||||||
{{- $src = printf "%s?%s" $src . }}
|
{{- $src = printf "%s?%s" $src . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue