问题
I'm trying to add pagination in my Jekyll based project.
So far, I have followed the below steps:
- Pagination in jekyll
- Followed Eric but no avail
I have set up _config.yml like this:
#Show 5 posts each page
paginate: 5
paginate_path: "/index/page:num/"
回答1:
If your posts printing loop you're using :
{% for post in site.posts %}
But, you must use :
{% for post in paginator.posts %}
来源:https://stackoverflow.com/questions/32755417/pagination-in-jekyll-not-working