1<!-- Pagination links - copied from http://jekyllrb.com/docs/pagination/ -->
2{% if paginator.total_pages > 1 %}
3<br />
4<div class="pagination">
5  {% if paginator.previous_page %}
6    <a href="{{ paginator.previous_page_path | replace: '//', '/' }}">&laquo; Prev</a>
7  {% else %}
8    <span>&laquo; Prev</span>
9  {% endif %}
10
11  {% for page in (1..paginator.total_pages) %}
12    {% if page == paginator.page %}
13      <em>{{ page }}</em>
14    {% elsif page == 1 %}
15      <a href="{{ '/blog' }}">{{ page }}</a>
16    {% else %}
17      <a href="{{ site.paginate_path | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
18    {% endif %}
19  {% endfor %}
20
21  {% if paginator.next_page %}
22    <a href="{{ paginator.next_page_path | replace: '//', '/' }}">Next &raquo;</a>
23  {% else %}
24    <span>Next &raquo;</span>
25  {% endif %}
26</div>
27<br />
28{% endif %}
29