{{ define "main" }} {{- $images := .Resources.ByType "image" }} {{- $cover := $images.GetMatch (.Params.cover | default "*cover*") }} {{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $cover }}
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

{{ .Title | emojify }}

{{ if or (.Params.showDate | default (.Site.Params.article.showDate | default true)) (and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial "functions/date.html" .Date) (partial "functions/date.html" .Lastmod))) (and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0)) (and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0)) (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
{{ end }} {{ with $feature }}
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }} {{ $class := "mb-6 -mt-4 rounded-md" }} {{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }} {{ with $.Params.coverCaption }}
{{ . | markdownify }}
{{ end }}
{{ end }}
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "
{{ partial "toc.html" . }}
{{ end }}
{{ .Content | emojify }}
{{ end }}