{{ define "main" }} {{/* Define a section to pull recent posts from. This will default to the section with the most number of pages. */}} {{ $mainSections := site.Params.mainSections | default (slice "posts") }} {{/* Create a variable with that section to use in multiple places. */}} {{ $section := where site.RegularPages.ByDate.Reverse "Section" "in" $mainSections }}
{{ with .Title }}

{{ . }}

{{ end }} {{ with .Content }}
{{ .Content }}
{{ end }} {{ range $section }} {{ .Render "teaser" }} {{ end }}
{{ end }}