diff --git a/layouts/albums/list.html b/layouts/albums/list.html index 5d037b8..6646a91 100644 --- a/layouts/albums/list.html +++ b/layouts/albums/list.html @@ -8,9 +8,8 @@
{{ $sa := . }} - {{ with .Params.teaserImage }} - {{ $img := $sa.Resources.Get . }} - {{ $sa.Title }} + {{ with .Resources.Get "thumbnail.jpg" }} + {{ $sa.Title }} {{ else }} {{ warnf "Could not find teaser image for %s" .RelPermalink }} diff --git a/layouts/partials/albums/images.json b/layouts/partials/albums/images.json index b8da7da..b3c55b5 100644 --- a/layouts/partials/albums/images.json +++ b/layouts/partials/albums/images.json @@ -1,9 +1,6 @@ {{- $first := true -}} {{- $filter := images.AutoOrient -}} -{{- $teaser := "" -}} -{{- with .Params.teaserImage -}} - {{- $teaser = $.Resources.GetMatch . -}} -{{- end -}} +{{- $teaser := .Resources.GetMatch "thumbnail.jpg" -}} {{- range .Resources.ByType "image" -}} {{- if not (eq $teaser .) -}} {{- if not $first }}, {{ end }}