Fix third-party resource save location

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-09 10:24:01 +02:00
parent ff705dd0ab
commit 39779cdc88
2 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,3 @@
{{ with .OutputFormats.Get "RSS" }}
{{ printf `
<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML
}}
<link href="{{- .Permalink -}}" rel="{{- .Rel -}}" type="{{- .MediaType.Type -}}" title="{{- $.Site.Title -}}" />
{{ end }}

View File

@@ -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 -}}