diff options
Diffstat (limited to 'themes/default/layouts/shortcodes/imgur-video.html')
-rw-r--r-- | themes/default/layouts/shortcodes/imgur-video.html | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/themes/default/layouts/shortcodes/imgur-video.html b/themes/default/layouts/shortcodes/imgur-video.html index a6d637a..9bc130f 100644 --- a/themes/default/layouts/shortcodes/imgur-video.html +++ b/themes/default/layouts/shortcodes/imgur-video.html @@ -1,17 +1,14 @@ {{- $id := default "rQIb4Vw" (.Get "id" | default (.Get 0)) -}} {{- $title := default "Imgur Gif" (.Get "title" | default (.Get 1)) -}} -{{- $caption := default "Imgur Gif" (.Get "caption" | default (.Get 2)) -}} +{{- $caption := default $title (.Get "caption" | default (.Get 2)) -}} {{- $options := default "controls autoplay loop muted playsinline" (.Get "options" | default (.Get 3)) -}} -{{- partial "video-container.html" - (dict - "Author" .Page.Section - "Caption" $caption - "Options" $options - "RelURL" (strings.TrimPrefix .Site.BaseURL .Page.Permalink) - "Source" (print "https://i.imgur.com/" $id ".mp4") - ) +{{- $source := print "https://i.imgur.com/" $id ".mp4" -}} + +{{- printf `{{< video source="%s" title="%s" caption="%s" options="%s" >}}` + $source $title $caption $options + | markdownify -}} |