{{- with .cxt}} {{/* Apply proper context from dict */}} {{- if .Params.cover.image }} {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
{{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }} {{- $cover := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- if $cover -}}{{/* i.e it is present in page bundle */}} {{- if $addLink }}{{ end -}} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }} {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false)) }} {{ $alt }} {{- else }}{{/* Unprocessable image or responsive images disabled */}} {{ $alt }} {{- end }} {{- else }}{{/* For absolute urls and external links, no img processing here */}} {{- if $addLink }}{{ end -}} {{ $alt }} {{- end }} {{- if $addLink }}{{ end -}} {{/* Display Caption */}} {{- if not $.IsHome }} {{ with .Params.cover.caption }}

{{ . | markdownify }}

{{- end }} {{- end }}
{{- end }}{{/* End image */}} {{- end -}}{{/* End context */}}