{{- $thumbnail := .thumbnail_url -}}
{{- $original := $thumbnail | replaceRE "(_.*\\.)" "." -}}
<div class="{{ $class }}">
- <a href="{{ .provider_url }}{{ .video_id }}" rel="noopener" target="_blank">
+ <a href="{{ .provider_url }}{{ .video_id | string }}" rel="noopener" target="_blank">
<img src="{{ $thumbnail }}" srcset="{{ $thumbnail }} 1x, {{ $original }} 2x" alt="{{ .title }}">
<div class="play">
{{ template "__h_simple_icon_play" $.ctx.Page }}
// Simple mode
files = strings.ReplaceAll(files, "privacy.vimeo.simple = false", "privacy.vimeo.simple = true")
b = hugolib.Test(t, files)
- b.AssertFileContent("public/p1/index.html", "c5bf16d87e2a370b")
+ b.AssertFileContent("public/p1/index.html", "04d861fc957ee638")
// Simple mode with non-existent id
files = strings.ReplaceAll(files, "{{< vimeo 55073825 >}}", "{{< vimeo __id_does_not_exist__ >}}")