mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
fix: improve warning messages for remote image retrieval failures
You can suppress the warning by adding the following to your site configuration: ignoreLogs = ['warning-remote-image']
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
{{- if $isRemote -}}
|
||||
{{- with try (resources.GetRemote .Src) -}}
|
||||
{{- with .Err -}}
|
||||
{{- warnf "%s" . -}}
|
||||
{{- warnidf "warning-remote-image" "%s" . -}}
|
||||
{{- else with .Value -}}
|
||||
{{- if .ResourceType | eq "image" -}}
|
||||
{{- /* placed remote image in public/images/remote/ */ -}}
|
||||
{{- $resource = . | resources.Copy (add "/images/remote/" .Name) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- warnf "Unable to get remote image %q" $.Src -}}
|
||||
{{- warnidf "warning-remote-image" "Failed to get remote image %q" $.Src -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user