Skip to content

Commit

Permalink
fix: correct broken fingerprint links on multihost (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Nov 2, 2023
1 parent 9d149d7 commit 3c7e24c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions layouts/partials/images/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
{{- $res = $page.Resources.GetMatch $path }}
{{- end }}
{{- with $res }}
{{- $originalSrc = ($res | fingerprint "md5").RelPermalink }}
{{/* TODO: use Permalink instead, since the fingerprint resources will not published to other sites. */}}
{{/* See https://github.com/hugomods/images/issues/23. */}}
{{- $originalSrc = ($res | fingerprint "md5").Permalink }}
{{- $originalWidth = $res.Width }}
{{- $originalHeight = $res.Height }}
{{/* Check if the image resource is valid. */}}
Expand Down Expand Up @@ -145,7 +147,9 @@
{{- $sources = $sources | append (dict "srcset" $modernImg.RelPermalink "type" $modernImg.MediaType) }}
{{- end }}
{{/* Reset image properties. */}}
{{- $src = ($res | fingerprint "md5").RelPermalink }}
{{/* TODO: use Permalink instead, since the fingerprint resources will not published to other sites. */}}
{{/* See https://github.com/hugomods/images/issues/23. */}}
{{- $src = ($res | fingerprint "md5").Permalink }}
{{- $height = $res.Height }}
{{- $naturalHeight = $res.Height }}
{{- $width = $res.Width }}
Expand Down

0 comments on commit 3c7e24c

Please sign in to comment.