Last active
August 29, 2015 14:15
-
-
Save justinallen/0eb12a9b4d7b8e69564d to your computer and use it in GitHub Desktop.
jekyll - basic pagination for posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="pagination"> | |
{% if page.previous %} | |
<a class="pagination-item older" href="{{page.previous.url}}">Older</a> | |
{% else %} | |
<span class="pagination-item older">Older</span> | |
{% endif %} | |
{% if page.next %} | |
<a class="pagination-item newer" href="{{page.next.url}}">Newer</a> | |
{% else %} | |
<span class="pagination-item newer">Newer</span> | |
{% endif %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment