{{ define "main" }}
<h1 class="page-heading">{{ .Title }}</h1>
<ul class="post-list">
  {{- range .Pages }}
  <li class="post-list__entry">
    <div class="post-list__meta">
      <time class="post-list__date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
      {{- with .Params.categories }}
      <span class="post-list__category">{{ index . 0 | lower }}</span>
      {{- end }}
    </div>
    <div class="post-list__body">
      <a href="{{ .Permalink }}" class="post-list__title">{{ .Title }}</a>
      {{- $excerpt := or .Description .Params.summary (.Summary | plainify) }}
      {{- if $excerpt }}
      <p class="post-list__excerpt">{{ $excerpt | truncate 200 }}</p>
      {{- end }}
    </div>
  </li>
  {{- end }}
</ul>
{{ end }}
