【发布时间】:2014-01-16 17:12:18
【问题描述】:
我目前正在开发一个基于 jekyll 的主页,但无法进行分页。
<ul class="posts">
{% for post in paginator.posts %}
<li>
<span class="list_date">{{ post.date | date_to_string }}</span> » <span class="list_title"> {{ post.title }} </span><br>
<span class="list_content">{{ post.content | strip_html | truncatewords:35}}</span>
<a href="{{ post.url }}">more...</a>
</li>
{% endfor %}
</ul>
这是我的流动代码,在使用站点而不是分页器时效果很好。 同样在我的 _config.yml 我有这部分:
paginate: 2
paginator_path: "news/page:num"
由于 index.html 文件在 news 文件夹中
【问题讨论】:
标签: html pagination jekyll liquid