fix: hugo deprecated 'Err'

This commit is contained in:
TaurusXin 2025-02-09 10:14:44 +08:00
parent adcff57b50
commit 1972e53431

View File

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