jekyll中的分页不起作用 [英] pagination in jekyll not working

查看:123
本文介绍了jekyll中的分页不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的基于Jekyll的项目中添加分页.

到目前为止,我已经按照以下步骤操作:

So far, I have followed the below steps:

  • Pagination in jekyll
  • Followed Eric but no avail

我已经设置 _config.yml 这个:

#Show 5 posts each page 
paginate: 5
paginate_path: "/index/page:num/"

推荐答案

如果您的帖子打印循环,您正在使用:

If your posts printing loop you're using :

{% for post in site.posts %}

但是,您必须使用:

{% for post in paginator.posts %}

这篇关于jekyll中的分页不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆