From 816a3489e4ae5e2b269e1c7c31a5e777c74d9827 Mon Sep 17 00:00:00 2001 From: FarseaSH Date: Thu, 8 Aug 2024 23:17:25 +0800 Subject: [PATCH] FEATURE add support to pictures resources stored in the assets file --- layouts/partials/pic_set.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/pic_set.html b/layouts/partials/pic_set.html index ad8aedd..45f5215 100644 --- a/layouts/partials/pic_set.html +++ b/layouts/partials/pic_set.html @@ -1,3 +1,6 @@ +{{ $pic_set := .pic_set }} +{{ $caption := .caption }} + {{ $num_per_row := 3}} {{ $max_width := 80}} {{ if or (eq (len .pic_set) 2) (eq (len .pic_set) 4)}} @@ -5,11 +8,12 @@ {{ $max_width = 53}} {{ end }} -{{ $caption := .caption}} -
- {{ range $num, $a := .pic_set }} + {{ range $num, $a := $pic_set }} + {{ if resources.Get $a }} + {{ $a = (resources.Get $a).Permalink }} + {{ end }}