{{ $articleType := .Params.type | default "life" }} {{ $typeConfig := .Site.Params.articleTypes }} {{ $typeData := index $typeConfig $articleType }} {{ $excerpt := .Params.excerpt | default .Description | default .Summary }} {{ $imageURL := "" }} {{ $useDefaultThumbnail := false }} {{ if .Params.image }} {{ $resource := .Resources.GetMatch .Params.image }} {{ if $resource }} {{ $imageURL = $resource.RelPermalink }} {{ else }} {{ $imageURL = .Params.image }} {{ end }} {{ else }} {{ $useDefaultThumbnail = true }} {{ end }}
{{ if or $imageURL $useDefaultThumbnail }} {{ if $useDefaultThumbnail }} {{ .Title }} {{ else }} {{ .Title }} {{ end }} {{ if $typeData }}
{{ i18n $articleType }}
{{ end }}
{{ end }}
{{ if .Params.pinned }}
📌 PINNED
{{ end }}

{{ .Title }}

{{ if $excerpt }}

{{ $excerpt | plainify }}

{{ end }} {{ i18n "readMore" }}