{{ define "main" }}
  {{- partial "nav.html" . -}}

  {{ $pages := union .RegularPages .Sections }}

  <div class="post-list">
    <h1>{{ with .Title }}{{ . }}{{ else }}{{ .Section }}{{ end }}</h1>
    <ul>
      {{ range $pages }}
        <li>
          <a href="{{ .RelPermalink }}">{{ .Title }}</a>
          {{ if gt .Date.Year 2000 }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
        </li>
      {{ end }}
    </ul>
  </div>
{{ end }}
