Fix third-party resource save location
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -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 }}
|
||||
|
@@ -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 -}}
|
||||
|
Reference in New Issue
Block a user