相关疑难解决方法(0)

杰基尔分页

我试图在jekyll中分页博客帖子,但似乎无法让它运作.这是我的设置我在我的根目录下有一个博客目录,它有一个index.md.我使用了jekyll网站上的以下代码

<ul>
{% for post in paginator.posts %}
<li><h1><a href="{{ post.url }}">{{ post.title }}</a></h1></li>
{% endfor %}
</ul>
Run Code Online (Sandbox Code Playgroud)

我的_config.yml中有以下内容

paginate: 10
Run Code Online (Sandbox Code Playgroud)

什么都没有显示出来.关于我搞砸的地方有什么建议吗?

更新 - 目录结构

$ls
_config.yml _layouts    _site       css     index.html
_includes   _posts

$ cd blog
$ ls
index.md
Run Code Online (Sandbox Code Playgroud)

pagination jekyll

4
推荐指数
1
解决办法
2582
查看次数

标签 统计

jekyll ×1

pagination ×1