{{ define "main" }}
{{ .Content }}

<h2>Recent Posts</h2>

{{ range first 10 (where .Site.RegularPages "Type" "posts") }}
<article style="margin-bottom: 30px;">
    <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
    <p class="date">{{ .Date.Format "January 2, 2006" }}</p>
    {{ if .Summary }}
    <p>{{ .Summary }}</p>
    {{ end }}
</article>
{{ end }}

<p><a href="/posts/">View all posts &rarr;</a></p>
{{ end }}
