jekyll-paginate-v2 icon indicating copy to clipboard operation
jekyll-paginate-v2 copied to clipboard

next/previous button in post page

Open bolun365 opened this issue 2 years ago • 0 comments

I list articles in a page like this:

{% if paginator %}
  {% assign posts = paginator.posts %}
{% else %}
  {% assign posts = site.posts %}
{% endif %}
{% assign entries_layout = page.entries_layout | default: 'list' %}
<div class="entries-{{ entries_layout }}">
  {% for post in posts %}
    {% include archive-single.html type=entries_layout %}
  {% endfor %}
</div>

But in the post page, the next previous article button and next article button still use the variable page.previous.url and page.next.url. The variable paginator can't be readed in post page.

bolun365 avatar Mar 09 '22 12:03 bolun365