Skip to content

Instantly share code, notes, and snippets.

@jacobmischka
Created March 24, 2016 19:29
Show Gist options
  • Save jacobmischka/58f592bad35e60278c72 to your computer and use it in GitHub Desktop.
Save jacobmischka/58f592bad35e60278c72 to your computer and use it in GitHub Desktop.
news.html
---
layout: page
title: News
header: true
permalink: none
---
<ul class="post-list">
{% for post in paginator.posts %}
<li class="post-list-item">
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%b %-d, %Y" }}</span>
</li>
{% endfor %}
<div class="pagination">
{% if paginator.previous_page %}
<a class="previous" href="{{ paginator.previous_page_path }}">Previous</a>
{% else %}
<span class="previous">Previous</span>
{% endif %}
<span class="page-number">Page: <span>{{ paginator.page }}</span> of <span>{{ paginator.total_pages }}</span></span>
{% if paginator.next_page %}
<a class="next" href="{{ paginator.next_page_path }}">Next</a>
{% else %}
<span class="next">Next</span>
{% endif %}
</div>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment