我尝试了以下内容,我在Zola文档中找到了这些内容,但它没有呈现任何内容。Tera文档也没什么价值。
{% for post in section.pages %}
<h1><a href="{{ post.permalink }}">{{ post.title }}</a></h1>
{% endfor %}发布于 2019-04-12 04:11:42
遍历分页节的正确方法如下:
{% for post in paginator.pages %}
<h1><a href="{{ post.permalink }}">{{ post.title }}</a></h1>
{% endfor %}在Pagination:getzola.org/documentation/templates下的模板部分中描述了paginator。
分页节获得的节变量与普通节页减去其页面的节变量相同。相反,页面是paginator.pages格式的。
https://stackoverflow.com/questions/55640410
复制相似问题