Skip to content

Commit

Permalink
reverse archives
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed Jan 16, 2011
1 parent 424e034 commit a2ae90b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _extensions/archive_iterator/archive_iterator.rb
Expand Up @@ -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],
Expand Down

0 comments on commit a2ae90b

Please sign in to comment.