gjtorikian / jekyll-last-modified-at

A Jekyll plugin to show the last_modified_at time of a post.
MIT License
242 stars 38 forks source link

{{ post.last_modified_at }} #19

Closed pathawks closed 10 years ago

pathawks commented 10 years ago

I would love if the time of last update could be made available as part of a post/pages data.

Specifically, it would be nice to use this to include the time of last update in a sitemap.
jekyll/jekyll-sitemap#18

Am I correct that this is nor currently implemented?

gjtorikian commented 10 years ago

I don't believe it's currently implemented. I also do not know much about Jekyll plugin interoperability, I'm afraid.

/cc @parkr for advice on how to go about doing this.

parkr commented 10 years ago

If we set our priority to be high, then we'll run before the sitemap plugin and we can set post.last_modified_at attribute for every post and page which is just an object with a #to_liquid method so it's only evaluated for the objects we ask about.

parkr commented 10 years ago

I did this in my super sexy rewrite #22.

https://github.com/gjtorikian/jekyll-last-modified-at/blob/82b48895c3990cf71747a9e866985a4003e8f42e/lib/jekyll-last-modified-at/generator.rb#L8

This can be closed :)