{{/* Used by 1. list.html and term.html (when the cardView option is enabled) 2. Recent articles template (when the cardView option is enabled) 3. Shortcode list.html */}} {{ $disableImageOptimization := site.Store.Get "disableImageOptimization" }} {{ $page := .Page }} {{ $featured := "" }} {{ $featuredURL := "" }} {{ if not .Params.hideFeatureImage }} {{/* frontmatter */}} {{ with $page }} {{ with .Params.featureimage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ if site.Params.hotlinkFeatureImage }} {{ $featuredURL = . }} {{ else }} {{ $featured = resources.GetRemote . }} {{ end }} {{ else }} {{ $featured = resources.Get . }} {{ end }} {{ end }} {{/* page resources */}} {{ if not (or $featured $featuredURL) }} {{ $images := .Resources.ByType "image" }} {{ range slice "*feature*" "*cover*" "*thumbnail*" }} {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} {{ end }} {{ end }} {{/* fallback to default */}} {{ if not (or $featured $featuredURL) }} {{ $default := site.Store.Get "defaultFeaturedImage" }} {{ if $default.url }} {{ $featuredURL = $default.url }} {{ else if $default.obj }} {{ $featured = $default.obj }} {{ end }} {{ end }} {{/* generate image URL if not hotlink */}} {{ if not $featuredURL }} {{ with $featured }} {{ $featuredURL = .RelPermalink }} {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} {{ $featuredURL = (.Resize "600x").RelPermalink }} {{ end }} {{ end }} {{ end }} {{ end }} {{ end }}
{{ with $featuredURL }}
{{ end }} {{ if and .Draft .Site.Params.article.showDraftLabel }} {{ partial "badge.html" (i18n "article.draft" | emojify) }} {{ end }}

{{ .Title | emojify }} {{ if .Params.externalUrl }} {{ end }}

{{ partial "article-meta/basic.html" . }}
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
{{ .Summary | plainify }}
{{ end }}