Partial recentposts.html
<aside>
{{ if isset .Data "Pages" -}}
<h1>Recent Posts</h1>
<ul>
{{ range first 5 (where .Data.Pages "Section" "post") -}}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{- end }}
</ul>
{{- end }}
</aside>