From 321ab8c87ed9104c3cafbff8fc794ed797d87263 Mon Sep 17 00:00:00 2001 From: FarseaSH Date: Tue, 13 Aug 2024 22:57:57 +0800 Subject: [PATCH] BUGFIX: fix url error for the single picture type --- layouts/partials/row.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts/partials/row.html b/layouts/partials/row.html index f50f804..e2c80b3 100644 --- a/layouts/partials/row.html +++ b/layouts/partials/row.html @@ -101,7 +101,11 @@ {{ if (eq (len $pictures_set) 1) }} {{ range $pictures_set }} - Responsive image + {{ $src := . }} + {{ if resources.Get $src }} + {{ $src = (resources.Get $src).Permalink }} + {{ end }} + Responsive image {{ end }} {{ end }} @@ -111,6 +115,10 @@ {{/* Probably DEPRECATED in the future: single picture (old version API `pic`)*/}} {{ with $page.Params.pic }} + {{ $src := . }} + {{ if resources.Get $src }} + {{ $src = (resources.Get $src).Permalink }} + {{ end }} Responsive image {{ end }}