Hi there,
I want to add Vimeo video into /layout/index.html, so tried the followings:
-
{{< vimeo 782787897 >}}
, this failed, seems this shortcode can not work in html;
<!-- vimeo -->
{{ if .Site.Params.vimeo.enable }}
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe src="https://player.vimeo.com/video/344519650" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="vimeo video" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
{{ end }}
<!-- /vimeo -->
The option 2 works but it’s not good to hardcoded the video id, so want to change https://player.vimeo.com/video/344519650
into https://player.vimeo.com/video/{{ .Site.Params.vimeo.id }}
I setup the parameters in config.toml
as below:
####################### hero video #######################################
[params.vimeo]
enable = true
id = “344519650”
But this change doesn’t work, I will appreciate if any ideas. Thanks.