Skip to content

Commit

Permalink
Merge pull request #742 from getnikola/archive-months
Browse files Browse the repository at this point in the history
Order Monthly Archive properly, descending order (Issue #740)
  • Loading branch information
ralsina committed Sep 21, 2013
2 parents f176800 + d403c56 commit 2bf708b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Features
Bugfixes
--------

* Order Monthly Archive properly, descending order (Issue #740)

New in 6.0.4
============

Expand Down
1 change: 1 addition & 0 deletions nikola/plugins/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def gen_tasks(self):
else: # Monthly archives, just list the months
months = set([m.split('/')[1] for m in self.site.posts_per_month.keys() if m.startswith(str(year))])
months = sorted(list(months))
months.reverse()
template_name = "list.tmpl"
context["items"] = [[get_month_name(int(month), lang), month] for month in months]
post_list = []
Expand Down

0 comments on commit 2bf708b

Please sign in to comment.