{{ $paginator := .Paginator }}

<nav>
  <ul class="pagination">
    {{ if $paginator.HasPrev }}
      <li class="page-item">
        <a href="{{ $paginator.Prev.Permalink }}" class="page-link">Previous</a>
      </li>
    {{else}}
      <li class="page-item disabled">
        <a href="#" class="page-link">Previous</a>
      </li>
    {{ end }}

    {{ range $paginator.Pagers }}
      <li class="page-item {{ if eq . $paginator }} active{{ end }}">
        <a href="{{ .Permalink }}" class="page-link">
          {{ .PageNumber }}
        </a>
      </li>
    {{ end }}

    {{ if $paginator.HasNext }}
      <li class="page-item">
        <a href="{{ $paginator.Next.Permalink }}" class="page-link">Next</a>
      </li>
    {{ else}}
      <li class="page-item disabled">
        <a href="#" class="page-link">Next</a>
      </li>
    {{ end }}
  </ul>
</nav>
