{{- $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 }} {{- with $processImage.SrcsetWebp -}}{{- end -}} {{- with $processImage.SrcsetWebp -}}{{- end -}} {{- .Title -}} {{- with $Summary -}}{{ . }}{{- end -}} {{- .Title -}} {{- with $Summary -}}{{ . }}{{- end -}} {{- else -}} {{- .Title -}} {{- with $Summary -}}{{ . }}{{- end -}} {{- end -}} {{- .Date.Format (T "date.d_m_y") -}} {{- .Date.Format (T "date.d_m") -}} {{- T "post.readingTime" .ReadingTime }} {{- if .Params.categories -}} {{- range .Params.categories -}} {{- . -}} , {{- end -}} {{- end -}} {{- if .Params.tags -}} {{- range first 4 .Params.tags -}} {{- . -}} {{- end -}} {{- end -}} {{- if .Params.tags -}} {{- range first 4 .Params.tags -}} {{- . -}} {{- end -}} {{- end -}}