2bcaf8246b
Key change is using the new `absolute_url` and `relative_url` filters http://jekyllrb.com/news/2016/10/06/jekyll-3-3-is-here/ https://github.com/blog/2277-what-s-new-in-github-pages-with-jekyll-3-3
29 lines
909 B
HTML
29 lines
909 B
HTML
<!-- Pagination links - copied from http://jekyllrb.com/docs/pagination/ -->
|
|
{% if paginator.total_pages > 1 %}
|
|
<br />
|
|
<div class="pagination">
|
|
{% if paginator.previous_page %}
|
|
<a href="{{ paginator.previous_page_path | relative_url | replace: '//', '/' }}">« Prev</a>
|
|
{% else %}
|
|
<span>« Prev</span>
|
|
{% endif %}
|
|
|
|
{% for page in (1..paginator.total_pages) %}
|
|
{% if page == paginator.page %}
|
|
<em>{{ page }}</em>
|
|
{% elsif page == 1 %}
|
|
<a href="{{ '/blog' | relative_url }}">{{ page }}</a>
|
|
{% else %}
|
|
<a href="{{ site.paginate_path | relative_url | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if paginator.next_page %}
|
|
<a href="{{ paginator.next_page_path | relative_url | replace: '//', '/' }}">Next »</a>
|
|
{% else %}
|
|
<span>Next »</span>
|
|
{% endif %}
|
|
</div>
|
|
<br />
|
|
{% endif %}
|