From a2a26eb189fb1355ad09fc0085c81214bc3bdfc1 Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 2 Jun 2022 11:44:11 +0800 Subject: [PATCH] update render-image to support video embed just like embed an image, use ![](/path/to/video.mov) --- layouts/_default/_markup/render-image.html | 11 ++++++++++- layouts/shortcodes/video.html | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 1aa9839..0fc039c 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -5,7 +5,16 @@ {{- end -}} {{- if $img -}} - {{ $.Text }} + {{- if eq $img.MediaType.MainType "video" -}} +
+ +
+ {{- else -}} + {{ $.Text }} + {{- end -}} {{- else -}} {{- warnf "No image found for %s from %s" .Destination .Page.File }} {{- end -}} diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html index 0132bb2..dd88719 100644 --- a/layouts/shortcodes/video.html +++ b/layouts/shortcodes/video.html @@ -1,7 +1,6 @@