warn if image is not found
This commit is contained in:
parent
228cf0d83f
commit
9e54118235
|
@ -4,6 +4,8 @@
|
|||
{{- $img = resources.Get $path -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $img -}}
|
||||
{{- if $img -}}
|
||||
<img loading="lazy" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" {{ with $.Title}} title="{{ . }}" {{ end }} />
|
||||
{{- else -}}
|
||||
{{- warnf "No image found for %s from %s" .Destination .Page.File }}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in New Issue