{{/* Used by 1. layouts/partials/related.html (related articles in single page) */}} {{ $disableImageOptimization := site.Store.Get "disableImageOptimization" }} {{ $page := .Page }} {{ $featured := "" }} {{ $featuredURL := "" }} {{ $thumbnailAspectRatio := site.Params.thumbnailAspectRatio | default "1.5" }} {{ $thumbnailAspectRatio = replaceRE "[^0-9.]" "" $thumbnailAspectRatio }} {{ if eq $thumbnailAspectRatio "" }}{{ $thumbnailAspectRatio = "1.5" }}{{ end }} {{ $featureImageHover := site.Params.list.featureImageHover | default false }} {{ if isset .Params "featureImageHover" }}{{ $featureImageHover = .Params.featureImageHover }}{{ end }} {{ $featureImagePosition := .Params.imagePositionFeature | default site.Params.imagePositionFeature | default site.Params.imagePosition }} {{/* frontmatter */}} {{ with $page }} {{ $p := . }} {{ with partial "functions/feature-image.html" . }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ if site.Params.hotlinkFeatureImage }} {{ $featuredURL = . }} {{ else }} {{ $featured = resources.GetRemote . }} {{ end }} {{ else }} {{ $featured = $p.Resources.Get . }} {{ if not $featured }} {{ $featured = resources.Get . }} {{ end }} {{ 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")) }} {{ with try (.Resize "600x") }} {{ with .Value }}{{ $featuredURL = .RelPermalink }}{{ end }} {{ 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 }}