From 39779cdc88f5a79e967ebb4ba099e107114e7cc3 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Sat, 9 Aug 2025 10:24:01 +0200 Subject: [PATCH] Fix third-party resource save location Signed-off-by: Nikolaos Karaolidis --- layouts/partials/head/rss.html | 4 +--- layouts/partials/image/reflect.html | 9 ++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/layouts/partials/head/rss.html b/layouts/partials/head/rss.html index 056f268..b89c713 100644 --- a/layouts/partials/head/rss.html +++ b/layouts/partials/head/rss.html @@ -1,5 +1,3 @@ {{ with .OutputFormats.Get "RSS" }} - {{ printf ` - ` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML - }} + {{ end }} diff --git a/layouts/partials/image/reflect.html b/layouts/partials/image/reflect.html index fb4124b..d15302a 100644 --- a/layouts/partials/image/reflect.html +++ b/layouts/partials/image/reflect.html @@ -14,7 +14,14 @@ {{- if $src -}} {{- $isRemote := strings.HasPrefix $src "http" -}} - {{- $image := cond $isRemote (resources.GetRemote $src) (resources.Get $src) -}} + {{- $image := "" -}} + + {{- if $isRemote -}} + {{- $remote := resources.GetRemote $src -}} + {{- $image = resources.Copy (printf "static/3rd-party/%s" $remote.Name) $remote -}} + {{- else -}} + {{- $image = resources.Get $src -}} + {{- end -}} {{- $result = (dict "image" $image "title" $title "alt" $alt) -}} {{- end -}}