{{- $page := . }} {{- $img := "" }} {{- with .Params.images }} {{- $img = index . 0 }} {{- else }} {{- $res := partialCached "hb/functions/page-thumbnail" . . }} {{- $default := site.Params.hb.blog.post_thumbnail_default }} {{/* Get the default thumbnail if set. */}} {{- if and (not $res) $default }} {{- $res = resources.Get $default }} {{- end }} {{- with $res }} {{- $img = replace .RelPermalink $page.RelPermalink "" | printf "%s?height=360px" }} {{- end }} {{- end -}} {{- with $img }} {{ partial "images/image" (dict "Page" $page "Alt" $page.Title "Filename" $img "ClassName" "hb-blog-post-card-img" "Original" false) }} {{- else }}
{{- default site.Title site.Params.hb.blog.post_thumbnail_placeholder }}
{{- end }}