fix: hugo deprecated 'Err'
This commit is contained in:
parent
adcff57b50
commit
1972e53431
@ -3,12 +3,7 @@
|
|||||||
|
|
||||||
{{- if and (hasPrefix $Permalink "http") (default false .Page.Site.Params.render.image.externalLink.enabled) -}}
|
{{- if and (hasPrefix $Permalink "http") (default false .Page.Site.Params.render.image.externalLink.enabled) -}}
|
||||||
{{- with resources.GetRemote $Permalink -}}
|
{{- with resources.GetRemote $Permalink -}}
|
||||||
{{- with .Err -}}
|
{{- $image = . -}}
|
||||||
{{- $warnMsg := printf "%s" $Permalink -}}
|
|
||||||
{{- warnf "%s.\nPlease check the link: %s\n" . $warnMsg -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $image = . -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- warnf "Unable to get remote resource %q" $Permalink -}}
|
{{- warnf "Unable to get remote resource %q" $Permalink -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user