{#
  urlFragment is an optional hash fragment like #tabs that can be
  used so that clicking a pagination button auto-scrolls user
  to <a name="urlFragment"></a> that's expected to exist on destination page
#}
{% macro render(currPage, totalPages, baseUrl, urlFragment) %}
  {% if totalPages > 1 %}
    <ul class="pager">
      <li {% if currPage === 1 %} class="disabled" {% endif %}>
        <a href="{{ baseUrl }}?page=1{{ urlFragment }}">First</a>
      </li>

      <li {% if currPage === 1 %} class="disabled" {% endif %}>
        <a href="{{ baseUrl + '?page=' + Math.max(currPage-1, 1) }}{{ urlFragment}}">
          &larr; Prev Page
        </a>
      </li>

      <a style="color: white;" href="{{ baseUrl + '?page=' + currPage }}{{ urlFragment }}">
        Page {{ currPage|commafy }} of {{ totalPages|commafy -}}
      </a>

      <li {% if currPage === totalPages %} class="disabled" {% endif %}>
        <a href="{{ baseUrl + '?page=' + Math.min(currPage+1, totalPages) }}{{ urlFragment }}">
          Next Page &rarr;
        </a>
      </li>

      <li {% if currPage === totalPages %} class="disabled" {% endif %}>
        <a href="{{ baseUrl }}?page={{ totalPages }}{{ urlFragment }}">Last</a>
      </li>

    </ul>
  {% endif %}
{% endmacro %}

{#
  urlFragment is an optional hash fragment like #tabs that can be
  used so that clicking a pagination button auto-scrolls user
  to <a name="urlFragment"></a> that's expected to exist on destination page
#}
{% macro render(currPage, totalPages, baseUrl, urlFragment) %}
  {% if totalPages > 1 %}
    <ul class="pager">
      <li {% if currPage === 1 %} class="disabled" {% endif %}>
        <a href="{{ baseUrl }}?page=1{{ urlFragment }}" rel="first">First</a>
      </li>

      <li {% if currPage === 1 %} class="disabled" {% endif %}>
        <a href="{{ baseUrl + '?page=' + Math.max(currPage-1, 1) }}{{ urlFragment}}" rel="prev">
          &larr; Prev Page
        </a>
      </li>

      <a style="color: white;" href="{{ baseUrl + '?page=' + currPage }}{{ urlFragment }}">
        Page {{ currPage|commafy }} of {{ totalPages|commafy -}}
      </a>

      <li {% if currPage === totalPages %} class="disabled" {% endif %}>
        <a href="{{ baseUrl + '?page=' + Math.min(currPage+1, totalPages) }}{{ urlFragment }}" rel="next">
          Next Page &rarr;
        </a>
      </li>

      <li {% if currPage === totalPages %} class="disabled" {% endif %}>
        <a href="{{ baseUrl }}?page={{ totalPages }}{{ urlFragment }}" rel="last">Last</a>
      </li>

    </ul>
  {% endif %}
{% endmacro %}

Add rel=first/prev/next/last to main pagination
Add rel=first/prev/next/last to main pagination
