{{ define "banner" }} {{ $blogPosts := .Paginator.Pages }} {{ $firstBlog := (index $blogPosts 0) }} {{ if and (isset $firstBlog.Params "featuredimage") (ne $firstBlog.Params.featuredimage "") }}
{{ partial "blog/info.html" (dict "blog" $firstBlog "site" .Site) }} {{ if ge (len $firstBlog.Summary) 397 }}

{{- htmlUnescape (plainify (safeHTML (substr $firstBlog.Summary 0 397))) -}}...

{{ else }}

{{- htmlUnescape (plainify (safeHTML $firstBlog.Summary)) -}}

{{ end }}
{{ $url := (printf "%s/%s" $firstBlog.Params.url $firstBlog.Params.featuredimage) | absURL }} {{ $firstBlog.Title }}
{{ end }} {{ end }} {{ define "main" }}
{{ $blogPosts := .Paginator.Pages }} {{ $firstBlog := (index $blogPosts 0) }} {{ if and (isset $firstBlog.Params "featuredimage") (ne $firstBlog.Params.featuredimage "") }} {{ if gt (len $blogPosts) 1 }} {{ partial "blog/list.html" (dict "posts" (after 1 $blogPosts) "paginator" .Paginator "site" .Site "page" . ) }} {{ end }} {{ else }} {{ partial "blog/list.html" (dict "posts" $blogPosts "paginator" .Paginator "site" .Site "page" . ) }} {{ end }}
{{ end }}