pagination in jekyll not working

与世无争的帅哥 提交于 2019-12-12 05:42:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!