Skip to content

Commit

Permalink
Hugo: Ignore missing images
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed Oct 28, 2022
1 parent a519861 commit 904bc07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layouts/_default/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ <h2 class="text-lg leading-tight break-word">
{{ with .Param "images" }}
{{ range . }}
{{ $img := resources.GetMatch . }}
{{ if not $img }}
{{ warnf "missing image %q" . }}
{{ continue }}
{{ end }}
{{ $imgSmall := $img.Resize "200x" }}
{{ $imgMedium := $img.Resize "400x" }}
<p class="float-left mt-6 mr-4 mb-4">
Expand Down

0 comments on commit 904bc07

Please sign in to comment.