From 9e54118235ec22d135a2a977349559208dbee35e Mon Sep 17 00:00:00 2001 From: Reorx Date: Fri, 20 May 2022 23:04:58 +0800 Subject: [PATCH] warn if image is not found --- layouts/_default/_markup/render-image.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 9c3c9a7..1aa9839 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -4,6 +4,8 @@ {{- $img = resources.Get $path -}} {{- end -}} -{{- with $img -}} +{{- if $img -}} {{ $.Text }} +{{- else -}} + {{- warnf "No image found for %s from %s" .Destination .Page.File }} {{- end -}}