2016-10-04 23:31:36 +02:00
|
|
|
<!-- Pagination links - copied from http://jekyllrb.com/docs/pagination/ -->
|
|
|
|
{% if paginator.total_pages > 1 %}
|
|
|
|
<br />
|
|
|
|
<div class="pagination">
|
|
|
|
{% if paginator.previous_page %}
|
2016-11-07 18:12:47 +01:00
|
|
|
<a href="{{ paginator.previous_page_path | relative_url | replace: '//', '/' }}">« Prev</a>
|
2016-10-04 23:31:36 +02:00
|
|
|
{% else %}
|
|
|
|
<span>« Prev</span>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% for page in (1..paginator.total_pages) %}
|
|
|
|
{% if page == paginator.page %}
|
|
|
|
<em>{{ page }}</em>
|
|
|
|
{% elsif page == 1 %}
|
2016-11-07 18:12:47 +01:00
|
|
|
<a href="{{ '/blog' | relative_url }}">{{ page }}</a>
|
2016-10-04 23:31:36 +02:00
|
|
|
{% else %}
|
2016-11-07 18:12:47 +01:00
|
|
|
<a href="{{ site.paginate_path | relative_url | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
2016-10-04 23:31:36 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% if paginator.next_page %}
|
2016-11-07 18:12:47 +01:00
|
|
|
<a href="{{ paginator.next_page_path | relative_url | replace: '//', '/' }}">Next »</a>
|
2016-10-04 23:31:36 +02:00
|
|
|
{% else %}
|
|
|
|
<span>Next »</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
{% endif %}
|