Date stamp in page name causing issues with if loop

Hey guys,

My site is a design portfolio and I have a handful of pages for projects that are date stamped in 2017…and then I have a recent page where the date stamp starts with 2018…

At the bottom of each project page I have buttons to navigate to the previous project or the next project, but for whatever reason…jekyll is only looping through the 2017 pages and ignoring the one with 2018…

My guess is I don’t have something configured or called out properly…but I’m stalled out on where to go from here. Here are the two if loops:

Previous page:
{% if and contains “work” %}

Previous Project


{% endif %}

Next Page:
{% if page.previous and page.previous.categories contains “work” %}

Next Project


{% endif %}

If i change the date stamp for the 2018 page to 2017…then it appears as expected…

What needs to change?

is there a repo to look at?

No repo exactly. I only have the URL to share.

are you using the paginator? 2018 pages are posts or pages? are they in the same directory as the 2017 ones?

probably going to be hard to trouble shoot this without a repo to look out.

Each page is a markdown file inside one _posts subfolder.

Each is named

I haven’t set any additional pagination settings, just using default Jekyll as it was installed

@lambiam Can you post the contents of the front matter block of the 2018-document, at least…?