2016-10-04 21:31:36 +00: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-15 15:39:43 +00:00
|
|
|
<a href="{{ paginator.previous_page_path | replace: '//', '/' }}">« Prev</a>
|
2016-10-04 21:31:36 +00: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-15 15:39:43 +00:00
|
|
|
<a href="{{ '/blog' }}">{{ page }}</a>
|
2016-10-04 21:31:36 +00:00
|
|
|
{% else %}
|
2016-11-15 15:39:43 +00:00
|
|
|
<a href="{{ site.paginate_path | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
2016-10-04 21:31:36 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% if paginator.next_page %}
|
2016-11-15 15:39:43 +00:00
|
|
|
<a href="{{ paginator.next_page_path | replace: '//', '/' }}">Next »</a>
|
2016-10-04 21:31:36 +00:00
|
|
|
{% else %}
|
|
|
|
<span>Next »</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
{% endif %}
|