posts_group_by_year_and_month

in _plugins/monthly_archive_plugin.rb [36:44]


    def posts_group_by_year_and_month(site)
      if Jekyll::VERSION < '3.0.0'
        posts = site.posts
      else
        posts = site.posts.docs
      end
      posts.each.group_by { |post| [post.date.year, post.date.month] }
    end