{{ define "main" }}
    <article>
        <h2>{{ .Title }}</h2>
        {{ .Content }}
    </article>

    <h3>Recent Posts</h3>
    <ul>
        {{ range first 5 .Site.RegularPages.ByDate.Reverse }}
            {{/* Only show pages from the 'post' section or other main sections */}}
            {{ if eq .Section "post" }}
                <li>
                    <a href="{{ .RelPermalink }}">{{ .Title }}</a>
                    <p><small>Published: {{ .Date.Format "January 2, 2006" }}</small></p>
                    {{ .Summary }}
                </li>
            {{ end }}
        {{ end }}
    </ul>
{{ end }}
