Rendering but not writing html file

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

Reading: _changelog/

I can see the file being rendered

Rendering Markup: _changelog/

but I don’t see a corresponding writing entry like the following.

 Writing: /workdir/site/_site/changelog/2023-08-07-embedded-eiv-url/index.html

I’ve checked the UTF8 BOM and other common issues, but at a loss about why the html file isn’t being written.

Does this only happen with one specific file, or does it happen with all files from the _changelog directory?

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.

maybe it is a future date issue? maybe it will work tomorrow!

1 Like

I think that may be it, locally its working where the date is valid on the build server where the clock will be UTC the date will be tomorrow.

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.

{% assign changelogs = (site.changelog | sort: 'date') | reverse %}

Adding future: true to _config.yml resolved the issue.