mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2024-12-24 05:55:53 -05:00
fix(cover): Fix linkFullImages 404 not found
Resolves: #1565 Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
This commit is contained in:
parent
9ea3bb0e1f
commit
e76bef8f8f
@ -9,7 +9,7 @@
|
||||
{{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||
{{- $cover := (or $pageBundleCover $globalResourcesCover)}}
|
||||
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
|
||||
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
|
||||
{{- if $addLink }}<a href="{{ (.Params.cover.image) | absURL }}" target="_blank"
|
||||
rel="noopener noreferrer">{{ end -}}
|
||||
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
|
||||
@ -22,8 +22,8 @@
|
||||
{{- if (ge $cover.Width $size) -}}
|
||||
{{ printf "%s %s" (($cover.Resize (printf "%sx" $size)).Permalink) (printf "%sw ," $size) -}}
|
||||
{{ end }}
|
||||
{{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
|
||||
sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}"
|
||||
{{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
|
||||
sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}"
|
||||
width="{{ $cover.Width }}" height="{{ $cover.Height }}">
|
||||
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
|
||||
<img loading="{{$loading}}" src="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" alt="{{ $alt }}">
|
||||
|
Loading…
Reference in New Issue
Block a user