Fail if image src is empty
This commit is contained in:
@@ -10,6 +10,10 @@
|
|||||||
{{ $title := .Get "title" }}
|
{{ $title := .Get "title" }}
|
||||||
{{ $width := .Get "width" }}
|
{{ $width := .Get "width" }}
|
||||||
|
|
||||||
|
{{ if not $src }}
|
||||||
|
{{ errorf "invalid src: %q" $src }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $content := partial "paige/img.html" (dict
|
{{ $content := partial "paige/img.html" (dict
|
||||||
"alt" $alt
|
"alt" $alt
|
||||||
"class" "img-fluid"
|
"class" "img-fluid"
|
||||||
|
Reference in New Issue
Block a user