Note: Pagination does not work with markdown files, it only works with html file extensions.
Just follow these steps to add pagination to your blog:
add the pagination setting:
yaml markdown: rdiscount pygments: true lsi: true exclude: ['README.markdown', 'README_FOR_COLLABORATORS.markdown', 'Gemfile.lock', 'Gemfile'] production: false //add this line to add pagination paginate: 3 //the number of post per page
just add the posts and the pagination links:
--- layout: default title: Blog --- <!-- Pagination links --> <div class="pagination"> <span class="previous">Previous</span> <span class="page_number ">Page: of </span> <span class="next ">Next</span> </div>
A note about page1
Jekyll does not produce a page1 folder so using the above code will not work when a link is produced of the form "/page1". The following textile will handle page1 and render a list of each page with links to all but the current page.