From 210e2a51709a796bd4704940712cbe9dc6e91136 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Thu, 24 Oct 2024 13:07:53 +0200 Subject: [PATCH] Hardcode thumbnail name --- layouts/albums/list.html | 5 ++--- layouts/partials/albums/images.json | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) 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 }}