From 032fac4396a4bf974f8ca0345a86c802e4f4578d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 3 Nov 2022 17:03:25 -0700 Subject: [PATCH] Clean up formatting of photo shortcode --- layouts/shortcodes/photo.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/layouts/shortcodes/photo.html b/layouts/shortcodes/photo.html index f5e0937..cb3bd6f 100644 --- a/layouts/shortcodes/photo.html +++ b/layouts/shortcodes/photo.html @@ -1,8 +1,9 @@ {{- with $photoPage := $.Page.GetPage (printf "photos/%s" (.Get 0)) -}} - {{- $thumbnail := partial "images/photo_thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}} - - - + {{- $thumbnail := partial "images/photo_thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}} + {{- $altText := $thumbnail.Params.alt | default .Title -}} + + {{ . }} + {{- else -}} - {{- errorf "No page matching '%s'" (.Get 0) -}} + {{- errorf "No page matching '%s'" (.Get 0) -}} {{- end -}}