{{- $Summary := .Summary | plainify -}} {{- $public_cdn := cond .Site.IsServer "" .Site.Params.publicCDN -}} {{- $lazyload_image := print $public_cdn ("images/outload.svg" | relURL) -}} {{- if eq .Type "posts" -}}
{{- $hasCover := or (.Site.Params.defaultFeaturedImage) (.Params.featured_image) -}} {{- if $hasCover -}} {{- $featuredImage := "" -}} {{- $processImage := "" -}} {{- $lazyload := .Site.Params.lazyload -}} {{- $featuredImageUrl := or .Params.featured_image .Site.Params.defaultFeaturedImage -}} {{- if (urls.Parse ($featuredImageUrl | safeURL)).Scheme -}} {{- $featured_image = $featuredImageUrl | safeURL -}} {{- else -}} {{- $featuredImage = cond (isset .Params "featured_image") (.Resources.GetMatch .Params.featured_image) (resources.Get .Site.Params.defaultFeaturedImage) -}} {{- $processImage = partial "functions/image-process" (dict "Image" $featuredImage "Site" .Site) -}} {{- $featuredImageUrl = print $public_cdn $processImage.Permalink -}} {{- 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 -}}