【发布时间】:2020-11-26 07:08:12
【问题描述】:
我正在尝试在 index.html 上添加明信片分页,而它仅适用于 localhost。谁能帮我找出问题出在哪里?
这是我的 post.html:
<section id="posts" class="container py-3 hide-on-search">
<div class="row">
<div class="col">
<h1 class="pl-3 mb-3">Recent Posts</h1>
<ul class="list-group list-group-flush px-xs-1 px-md-5 mb-3">
{% for post in paginator.posts %}
<li class="list-group-item">
<p class="mb-0 text-muted">{{ post.date | date: "%b %-d, %Y" }}</p>
<a class="lead" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
<p class="mb-0">
{% if post.description %} {{ post.description }} {% else %} {{ post.excerpt | strip_html | strip_newlines | escape }} {% endif %}
</p>
</li>
{% endfor %}
</ul>
</div>
</div>
</section>
我正在使用 jekyll-paginate,看来 {% for post in paginator.posts %} 行不起作用。
这是我的仓库:https://github.com/Colawithrain/Colin_Blog
这是我的 github 页面:https://colawithrain.github.io/Colin_Blog/\
干杯,
科林
【问题讨论】:
标签: jekyll-paginator