0
我正在使用jekyll并试图使用分页。从我已阅读分页只能在html文件中工作(如for
列表)。所以,当我去impliment,我只是走进我config.yml并添加Jekyll - 分页问题
pageinate: 5
paginate_path: "Blog/page:num"
和Blog/
我加index.html
这简直是
---
layout: blogIndex
---
布局blogIndex
包含
<!DOCTYPE HTML>
<html>
<head>
<title>Blog</title>
</head>
<body onload="init();" onresize="setSize();">
{% include header.html %}
<div id="page">
<div id="content" class="{{ page.title }}">
{% for post in paginator.posts %}
<div class="post">
<a class="bTitle" href="{{post.url}}">{{post.title}}</a>
<div class="date">
{{post.date | date: "%B %-d, %Y" }}
</div>
<div class="pContent">
{{post.excerpt}}
</div>
</div>
{% endfor %}
</div>
</div>
{% include footer.html %}
</body>
</html>
当我生成我的网站并转到/ Blog时,它没有缝合工作,当我创建了12个帖子时没有帖子出现,但是当我替换paginator
与site
它会列出我的所有帖子(所以它的defiantly paginator不工作)。有什么我在这里做错了或失踪?