Have a strange problem where Jekyll is detecting a markdown file and using it but not writing the html file.
I have a collection called “changelog” set up and add new entries into the “_changelog” folder. I have a page that iterates all the entries and enables click through to the entry.
With one particular file it’s not working correctly. I see the entry showing up in the index page being populated with
{% assign changelogs = (site.changelog | sort: 'date') | reverse %}
{% for version in changelogs %}
Looking at the --verbose logs I can see the file being found
Does the file have YAML front-matter? By default Jekyll doesn’t generate HTML unless the Markdown file has front-matter (can be empty). Note that Github Pages uses a plugin to force all Markdown into HTML.
At the moment it’s only happening with the most recent file in the _changelog directory, all the test are rendering to html files correctly.
Yes the new md file has YAML front-matter. The page I have rendering the list of _changelog entries is correctly rendering including the front matter from the file from which an html file isn’t being created.
Just did some further testing and this was the problem. Locally the date was “2023-08-23” and so everything rendered correctly. On the build server in UTC that date was a future one as therefore the markdown file was not rendered.
The weirdness came about because it’s returned in the following query, but not actually renderered.