Incorrect page.date in Jekyll 4

I have a page with a name like this:

_pages/2017-05-28-glarnisch-walk/index.md

There’s no date field defined in the front matter, but with Jekyll 3.9.0 the date is parsed out of the filename; I’m then displaying this via my layout.

      <time class="date" datetime="{{ page.date }}">
          {{ page.date | date: "%Y %B %d" }}
      </time>
      <time class="date" datetime="2017-05-28 00:00:00 +0200">
          2017 May 28
      </time>

My collection is defined as follows:

collections:
  pages:
    permalink: /:path:output_ext
    output: true

However, if I upgrade to Jekyll 4.3.1, this no longer works — the date is never set and is set to the current time.

I’m guessing that the default behaviour has changed somewhere along the line; I’ve tried to find something in the release notes but don’t see anything. Is this change intentional or does it point to something I could be doing wrong at my end? If the former, can it be reenabled?

Shoudln’t the path to the page be _pages/2017-05-28-glarnisch-walk.md? Why is it in a subdirectory?

1 Like

It’s in a subdirectory so that each pages’ resources is isolated from the others. Is that no longer supported?

Oh, it is! I wasn’t aware of that. From which Jekyll version did you upgrade to 4.3.1? Maybe the release notes between the two versions contain a hint.

I can reproduce your problem with a basic Minima blog and Jekyll 4.3.2.

I was using 3.9.0, I believe — while I don’t have a record of which specific version it was, I upgraded and downgraded several times while I was figuring out what was wrong, and I was using the most recent v3 on Debian.