{{ define "main" }}

{{.Title}}

{{ with .Params.subtitle }} {{.}} {{ end }}
{{.Content}}
{{ range first 10 .Site.RegularPages }} {{ .Render "summary"}} {{ end }}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ range $pages.ByPublishDate.Reverse }}

{{ .Title | markdownify }} {{ $customDateFormat := "January 2, 2006" }} {{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }}
{{ .PublishDate.Format $customDateFormat }} {{ partial "tags" . }} {{ if eq .Site.Params.showPostSummary true }}
{{ .Summary }} {{ end }}

{{ end }} {{ end }}