gjtorikian / jekyll-last-modified-at

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

Deprecation warning for posts in Jekyll 3.1.3 #41

Closed iloveip closed 4 years ago

iloveip commented 8 years ago

Hi there,

After I installed this plugin, I get the following deprecation warning:

Deprecation: posts.each should be changed to posts.docs.each.
                    Called by /Users/svetlana/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-last-modified-at-0.3.4/lib/jekyll-last-modified-at/generator.rb:7:in `block in generate'.

I don't know if it's the same thing, as in issue #37 that has already been reported.

jp26jp commented 8 years ago

+1

ilg-ul commented 8 years ago

+1

any chance to fix this problem?

SummerBuger commented 7 years ago

+1 who can help me with this problem???

michaelx commented 7 years ago

@SummerBuger feel free to check out my lightweight alternative. Using it in production since half a year.

aav7fl commented 7 years ago

PR #43 fixed this for me.

Explanation: My issue was that Jekyll-sitemap was requiring Jekyll 3.3 and was depending on jekyll-last-modified-at 0.3.4 (which made the deprecated call) and not 1.0.0 (which fixed that I think). In order for Jekyll-sitemap to use 1.0.0 (or in this case, 1.0.1), some dependencies needed to be updated.

I just ran gem update after these latest commits and everything is working great again. No more warning.

gjtorikian commented 4 years ago

Gem is locked to >= 3.7, and GitHub Pages itself runs 3.8. Seems like a fix for this was made anyhow, closing as stale.