Fail if no content for gallery

master
Will Faught 2 years ago
parent b6ea579be1
commit e8c141de37

@ -12,6 +12,10 @@
{{ $inner := chomp .Inner }} {{ $inner := chomp .Inner }}
{{ $resources := slice }} {{ $resources := slice }}
{{ if and (not $images) (not $inner) }}
{{ errorf "paige/gallery: no content specified" }}
{{ end }}
{{ if not $inner }} {{ if not $inner }}
{{ with $images }} {{ with $images }}
{{ with $.Page.Resources.Match . }} {{ with $.Page.Resources.Match . }}

Loading…
Cancel
Save