michaelx / jekyll-last-modified

Dead simple plugin to return the last modified date of a file. Useful to build a better sitemap.xml :)
MIT License
13 stars 1 forks source link

Last Modified No Longer Works #1

Open EdenKupe opened 4 years ago

EdenKupe commented 4 years ago

Hey,

Trying my luck shouting into the void here :) It seems as if this plugin (and others like it) don't work any more. When building locally, the last modified date works fine. But when going to production (and people have tried several different environments, like AWS/Platform/Haroku), all the dates display the current date.

Any ideas? Was this caused by a chance to Jekyll?

Thanks!

michaelx commented 4 years ago

What’s your environment? I deployed (https://mymorningroutine.com/sitemap.xml) today and it’s still working, albeit I’m not using the latest Jekyll (3.8.5 with Ruby 2.5.3).

When building locally, the last modified date works fine.

Does this refer to jekyll build or jekyll serve? How do you build and deploy?

Hope we can figure it out :)

chocmake commented 7 months ago

Possibly related to the same issue from this thread, where users experienced a similar thing with AWS, Heroku and Cloudflare.

slsu0424 commented 3 months ago

@michaelx - I came across your solution via this forum - https://talk.jekyllrb.com/t/how-to-set-lastmod-to-file-modified-date/8609

I'm running into the same issue. I've am customizing one of the Jekyll themes that is compatible with GitHub pages (https://jekyllthemes.io/theme/mediumish) for personal use.

It seems that once I add {% last_modified {{ post.path }} %} to _layouts/post.html, the build fails with the following error:   Requiring: kramdown-parser-gfm Rendering Layout: _posts/2024-06-02-sample-post.md Layout source: site github-pages 231 \| Error: Liquid syntax error (line 39): Unknown tag 'last_modified'.

I've followed the installation as mentioned in the README.md.

I'm fairly new to Ruby/Jekyll - any ideas of where to start for troubleshooting?