Open
Description
The items in the collection that contains permalink: false
is still considered to be a next or previous post during 11ty rendering.
To Reproduce
Posts structure:
posts/post-a.md
posts/post-b.md -> permalink: false
posts/post-c.md
Prev/Next:
<ul>
{% set previousPost = collections.posts | getPreviousCollectionItem(page) %}
{% if previousPost %}<li><a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a></li>{% endif %}
{% set nextPost = collections.posts | getNextCollectionItem(page) %}
{% if nextPost %}<li><a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a></li>{% endif %}
</ul>
Expected behaviour
When I open http://localhost:8080/posts/post-a/
the URL of the next post is http://localhost:8080/posts/post-b/false
instead of http://localhost:8080/posts/post-c/
Environment
- Eleventy: v0.11.1
- NodeJS: v14.15.0
- OS: Big Sur 11.0.1