{{- $Summary := .Summary | plainify -}} {{- $public_cdn := cond .Site.IsServer "" .Site.Params.publicCDN -}} {{- if eq .Type "posts" -}}
{{- $hasCover := or (.Site.Params.defaultFeaturedImage) (.Params.featured_image) -}} {{- if $hasCover -}} {{- $featured_image := "" -}} {{- $srcset := "" -}} {{- $srcset_webp := "" -}} {{- $featured_image_small := "" -}} {{- $featured_image_big := "" -}} {{- $featured_image_small_webp := "" -}} {{- $featured_image_big_webp := "" -}} {{- $featured_image_bg := "" -}} {{- $width := 0 }} {{- $height := 0 }} {{- $lazyload := .Site.Params.lazyload -}} {{- $featured_image_url := or .Params.featured_image .Site.Params.defaultFeaturedImage -}} {{- if (urls.Parse ($featured_image_url | safeURL)).Scheme -}} {{- $featured_image = $featured_image_url | safeURL -}} {{- else -}} {{- if .Params.featured_image -}} {{- $featured_image = .Resources.GetMatch .Params.featured_image -}} {{- else -}} {{- $featured_image = resources.Get .Site.Params.defaultFeaturedImage -}} {{- end }} {{- $width = $featured_image.Width -}} {{- $height = $featured_image.Height -}} {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} {{- $featured_image_small = print $public_cdn ($featured_image.Resize "800x").RelPermalink -}} {{- $featured_image_big = print $public_cdn ($featured_image.Resize "1200x").RelPermalink -}} {{- $featured_image_bg = print $public_cdn (($featured_image.Resize "50x").Filter (images.GaussianBlur 2 )).RelPermalink -}} {{- $srcset = printf "%s 800w, %s 1200w" $featured_image_small $featured_image_big -}} {{- $featured_image_small_webp = print $public_cdn ($featured_image.Resize "800x webp").RelPermalink -}} {{- $featured_image_big_webp = print $public_cdn ($featured_image.Resize "1200x webp").RelPermalink -}} {{- $srcset_webp = printf "%s 800w, %s 1200w" $featured_image_small_webp $featured_image_big_webp -}} {{- end -}} {{- $featured_image = print $public_cdn $featured_image.RelPermalink -}} {{- end }}
{{- .Title -}} {{- with $Summary -}}
{{ . }}
{{- end -}}
{{- else -}}
{{- .Title -}}
{{- with $Summary -}}
{{ . }}
{{- end -}}
{{- end -}}
{{- if .Params.categories -}}
{{- range .Params.categories -}} {{- . -}} , {{- end -}}
{{- end -}}
{{- if .Params.tags -}} {{- range first 4 .Params.tags -}} {{- . -}} {{- end -}} {{- end -}}
{{- else -}}
{{- with $Summary -}}
{{ . }}
{{- end -}}
{{- end -}}