Permalink
Browse files

reverse archives

  • Loading branch information...
flyerhzm committed Jan 16, 2011
1 parent 424e034 commit a2ae90bb1c201bb8ef4e7593c2e583d962e80085
Showing with 3 additions and 2 deletions.
  1. +3 −2 _extensions/archive_iterator/archive_iterator.rb
@@ -2,8 +2,9 @@ module Jekyll
AOP.around(Site, :site_payload) do |site_instance, args, proceed, abort|
monthly_archives = []
- site_instance.collated.each do |year, hash|
- hash.each do |month, days|
+ site_instance.collated.keys.sort.each do |year|
+ site_instance.collated[year].keys.sort.each do |month|
+ days = site_instance.collated[year][month]
monthly_archives << {
'name' => "#{Date::MONTHNAMES[month]} #{year}",
'url' => "%04d/%02d" % [year.to_s, month.to_s],

0 comments on commit a2ae90b

Please sign in to comment.