{{ define "main" -}}
    <div class="homepage-content">
      <!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
      {{ .Content }}
    </div>
    <h2>Latest Updates</h2>
  <div class="posts">
    {{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
    {{- $paginator := .Paginate $pages -}}

    {{ range $paginator.Pages }}
      <article class="post">
        <h3>
          <a href="{{ .Permalink }}">{{ .Title }}</a>
        </h3>

        <div class="post-date">
          <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
        </div>

        <div>
          {{ .Summary }}
        </div>

        <div class="read-more-link">
          <a href="{{ .Permalink }}">Read More</a>
        </div>
      </article>
    {{- end }}
  </div>

  {{ template "_internal/pagination.html" . }}
 
{{- end }}

