I have some language in a series.html file located in the _includes section of my jekyll blog, pasted below:
{% if page.series %}
{% assign count = '0' %}
{% assign idx = '0' %}
{% for post in site.posts reversed %}
{% if post.series == page.series %}
{% capture count %}{{ count | plus: '1' }}{% endcapture %}
{% if post.url == page.url %}
{% capture idx %}{{count}}{% endcapture %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
While it does connect the posts that are designated as part of a series within the post's YAML layout, it also connects other posts as part of a series as well even though they are not designated as 'series' in the YAML front matter of the post, despite the if statement. This results in all of my posts being part of a general "series" which I do not want. I just want to designate some posts to be part of a series while others are just unique one-off posts.
I have tried the following:
- Not specifying a series at all within the YAML front matter
- setting series: False
- setting series: None