Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (32 sloc) 1020 Bytes
---
layout: default
---
<h1>Recent Posts</h1>
{% for post in paginator.posts %}
{% include post-preview.html %}
{% endfor %}
{% if paginator.total_pages > 1 %}
<div class="pagination">
<div class="paginate-left">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">← Prev</a>
{% endif %}
</div>
<div class="paginate-center">
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
{{ page }}
{% elsif page == 1 %}
<a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
</div>
<div class="paginate-right">
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next →</a>
{% endif %}
</div>
</div>
{% endif %}
You can’t perform that action at this time.