From bfb3e90505d1ef007fecceb32fe99ed08a9485c7 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 4 Mar 2023 11:02:07 -0800 Subject: [PATCH] Fail if image src is empty --- layouts/shortcodes/paige/image.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/shortcodes/paige/image.html b/layouts/shortcodes/paige/image.html index b80a8197..c3192996 100644 --- a/layouts/shortcodes/paige/image.html +++ b/layouts/shortcodes/paige/image.html @@ -10,6 +10,10 @@ {{ $title := .Get "title" }} {{ $width := .Get "width" }} +{{ if not $src }} + {{ errorf "invalid src: %q" $src }} +{{ end }} + {{ $content := partial "paige/img.html" (dict "alt" $alt "class" "img-fluid"