Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (28 sloc) 1008 Bytes
---
title: Blog
layout: layouts/base.njk
eleventyNavigation:
key: Blog
order: 3
pagination:
data: collections.posts
size: 10
alias: postslist
reverse: true
permalink: "posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber + 1 }}/{% endif %}"
---
{% include "postslist.njk" %}
{% if pagination.pages and pagination.pages.length > 1 %}
<nav aria-labelledby="pagination" id="pagination" class="pagination">
<ol class="pagination__list">
{%- for pageEntry in pagination.pages %}
<li class="pagination__list-item">
<a class="pagination__item" href="{{ pagination.hrefs[ loop.index0 ] }}"{% if page.url == pagination.hrefs[ loop.index0 ] %} aria-current="page"{% endif %} aria-label="Page {{ loop.index }}">{{ loop.index }}</a>
</li>
{%- endfor %}
</ol>
{% if pagination.page.next %}
<a class="pagination__item pagination__item--next" href="{{ pagination.href.next }}" aria-label="Next page">Next</a>
{% endif %}
</nav>
{% endif %}
You can’t perform that action at this time.