Skip to content

Commit

Permalink
Merge pull request #27 from toby-marks/main
Browse files Browse the repository at this point in the history
Correcting for errors introduced by Hugo 0.141
  • Loading branch information
h-enk authored Feb 20, 2025
2 parents c77cb8e + 7914bea commit bd9f3c7
Show file tree
Hide file tree
Showing 5 changed files with 584 additions and 579 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-lies-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thulite/images": patch
---

Correcting for errors introduced by Hugo 0.141
8 changes: 4 additions & 4 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@
{{- /* Get image resource. */}}
{{- $r := "" }}
{{- if $u.IsAbs }}
{{- with resources.GetRemote $u.String }}
{{- with try (resources.GetRemote $u.String) }}
{{- with .Err }}
{{- if eq $errorLevel "warning" }}
{{- warnf "%s. See %s" . $contentPath }}
{{- warnf "%s. See %s" .Err $contentPath }}
{{- else if eq $errorLevel "error" }}
{{- errorf "%s. See %s" . $contentPath }}
{{- errorf "%s. See %s" .Err $contentPath }}
{{- end }}
{{- else }}
{{- else with .Value }}
{{- /* Destination is a remote resource. */}}
{{- $r = . }}
{{- end }}
Expand Down
Loading

0 comments on commit bd9f3c7

Please # to comment.