fix permalinks 21-12-11 19:17:01
This commit is contained in:
@ -13,10 +13,10 @@
|
||||
{{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false) (eq $prod true)) }}
|
||||
<img srcset="{{- range $size := $sizes -}}
|
||||
{{- if (ge $cover.Width $size) -}}
|
||||
{{ printf "%s %s" (($cover.Resize (printf "%sx" $size)).Permalink) (printf "%sw ," $size) -}}
|
||||
{{ printf "%s %s" (($cover.Resize (printf "%sx" $size)).RelPermalink) (printf "%sw ," $size) -}}
|
||||
{{ end }}
|
||||
{{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
|
||||
sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}" />
|
||||
{{- end -}}{{$cover.RelPermalink }} {{printf "%dw" ($cover.Width)}}"
|
||||
sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.RelPermalink }}" alt="{{ $alt }}" />
|
||||
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
|
||||
<img src="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
|
Reference in New Issue
Block a user