Last active
August 29, 2015 14:05
-
-
Save tonyfast/6554aa89b7b60ded697e to your computer and use it in GitHub Desktop.
Easy solution to Jekyll /page1 when paginating
This file contains hidden or 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
| <!-- | |
| See http://jekyllrb.com/docs/pagination/#render-the-paginated-posts | |
| for futher usage of pagination on Jekyll pages | |
| --> | |
| <div class="pagination"> | |
| {% if paginator.previous_page %} | |
| <a href="{{ paginator.previous_page_path }}" class="previous">Previous</a> | |
| {% else %} | |
| <span class="previous">Previous</span> | |
| {% endif %} | |
| <span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span> | |
| {% if paginator.next_page %} | |
| <a href="{{ paginator.next_page_path }}" class="next">Next</a> | |
| {% else %} | |
| <span class="next ">Next</span> | |
| {% endif %} | |
| </div> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
{{ paginator.next_page_path }}instead of{{ paginator.next_page }}to build the paginated path.Reference to problem
Jekyll Edge Case