{{ define "main" }}
<div class="section">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <h1>{{ .Title }}</h1>
        {{ if .Params.description }}
          <p class="lead">{{ .Params.description }}</p>
        {{ end }}
        
        <div class="content">
          {{ .Content }}
        </div>
        
        {{ if .Pages }}
          <div class="section-posts mt-5">
            <div class="posts-list">
              {{ $paginator := .Paginate (.Pages.ByDate.Reverse) }}
              {{ range $paginator.Pages }}
                <article class="post mb-4">
                  <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
                  {{ if .Summary }}
                    <div>{{ .Summary | safeHTML }}</div>
                  {{ end }}
                  <div class="post-meta">
                    <small class="text-muted">{{ .Date.Format "January 2, 2006" }}</small>
                  </div>
                </article>
              {{ end }}
            </div>
          </div>
        {{ end }}
      </div>
    </div>
  </div>
</div>
{{ end }}