{{ define "main" }}

<!-- $pages -->
{{ $pages := union .RegularPages .Sections }}
<!---->
{{ if .IsHome }} {{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ end }}

<!-- Articles -->
{{ $paginator := .Paginate $pages }}
<ul class="article-list">
  {{ range $index, $page := $paginator.Pages }}
    <li class="article-list-item {{ with site.Params.chalk.scrollappear_enabled }}scrollappear{{ end }}">
      <a href="{{ .Permalink }}" title="{{ .Title }}">
        <h5>
          {{ .