From 3ea78d2c6662730c3905f2a3fc75d079ca86f565 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 31 May 2021 18:59:42 +0100 Subject: [PATCH] feat: support animated GIF in figures Workaround Hugo converting animated gifs to static gifs: https://github.com/gohugoio/hugo/issues/5030 --- wowchemy/layouts/shortcodes/figure.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wowchemy/layouts/shortcodes/figure.html b/wowchemy/layouts/shortcodes/figure.html index 30010ae7..74eb7f47 100644 --- a/wowchemy/layouts/shortcodes/figure.html +++ b/wowchemy/layouts/shortcodes/figure.html @@ -27,7 +27,8 @@
{{- if $img -}} {{ $isSVG := eq $img.MediaType.SubType "svg" }} - {{ if $isSVG -}} + {{ $isGIF := eq $img.MediaType.SubType "gif" }} + {{ if $isSVG | or $isGIF -}}