Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Date formatting does not work #75

Open
fingolfin opened this issue Feb 3, 2020 · 3 comments
Open

Date formatting does not work #75

fingolfin opened this issue Feb 3, 2020 · 3 comments

Comments

@fingolfin
Copy link

I used gem install jekyll-last-modified-at to get version 1.2.1 of this plugin. For testing, In inserted this into a raw HTML file (not using any layouts or whatever, and with a trivial YAML header):

<ul>
<li>{% last_modified_at %}</li>
<li>{% last_modified_at %Y:%B:%A:%d:%S:%R %}</li>
<li>{{ page.last_modified_at }}</li>
<li>{{ page.last_modified_at | date: '%Y:%B:%A:%d:%S:%R' }}</li>
</ul>

These are simply the inputs from the README. But to my surprise, I got this output:

  • 15-Jan-16
  • 15-Jan-16
  • 2016-01-15 12:27:07 +0100
  • 2016:January:Friday:15:07:12:27

So the format string for last_modified_at is not actually having an effect...

@fingolfin
Copy link
Author

Oh yeah, this is with Jekyll 4.0.0

@rgooler
Copy link

rgooler commented May 1, 2020

I suspect the issue is that, since they changed how caching works in jekyll, that this got broken: https://github.com/gjtorikian/jekyll-last-modified-at/blob/master/lib/jekyll-last-modified-at/determinator.rb#L22

However, I'm not sure how to fix it.

@gjtorikian
Copy link
Owner

since they changed how caching works in jekyll,

Interesting, can you link me to a PR or blog indicating this? I can try to take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants