You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.1 KiB

---
title: Blog
permalink: /blog/
pagination:
enabled: true
---
<!-- posts -->
{% for post in paginator.posts %}
<h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
<p class="post-metadata">Published on {{ post.date | date: "%b %-d, %Y" }}</p>
{{ post.content }}
{% endfor %}
<!-- pagination -->
{% if paginator.total_pages > 1 %}
<ul class="pagination">
{% if paginator.previous_page %}
<li><a href="{{ paginator.previous_page_path | relative_url }}">&laquo; Prev</a>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li>{{ page }}</li>
{% elsif page == 1 %}
<li><a href="{{ paginator.previous_page_path | relative_url }}">{{ page }}</a></li>
{% else %}
<li><a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li><a href="{{ paginator.next_page_path | relative_url }}">Next &raquo;</a></li>
{% endif %}
</ul>
{% endif %}