]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
tpl/tplimpl: Fix vimeo shortcode test to accommodate API changes
authorJoe Mooring <joe@mooring.com>
Fri, 9 May 2025 17:02:00 +0000 (10:02 -0700)
committerGitHub <noreply@github.com>
Fri, 9 May 2025 17:02:00 +0000 (10:02 -0700)
Fixes #13687

tpl/tplimpl/embedded/templates/_shortcodes/vimeo_simple.html
tpl/tplimpl/shortcodes_integration_test.go

index 86a6dfc9f4cc0a4b7edf40d2f4ba46684aab5e3f..2e5f882829c3c98a2199ab61ca898b3c8140505e 100644 (file)
@@ -37,7 +37,7 @@
         {{- $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 }}
index 9d7af4a3da88edfda6ad4975412d0da1dea470cf..838dc16d745316dc162443cd4c0838f81706e9c3 100644 (file)
@@ -495,7 +495,7 @@ Content: {{ .Content }}
        // 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__ >}}")