Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Sort yearly archive task generation.
Resolves #1833.
  • Loading branch information
da2x committed Jun 18, 2015
1 parent 0868c96 commit 81c6cfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -15,6 +15,7 @@ Features
Bugfixes
--------

* Unnecessary rebuilds of yearly archives (Issue #1833)
* Quietly ignore non-existent files in ``nikola check -l`` (Issue #1831)
* Don’t rebuild all tag or category pages when changing tag/category descriptions
* Fix crash in wordpress code importer (Issue #1819)
Expand Down
6 changes: 5 additions & 1 deletion nikola/plugins/task/archive.py
Expand Up @@ -144,7 +144,11 @@ def gen_tasks(self):
# if we are creating one single archive, or full archives
archdata[None] = self.site.posts # for create_single_archive

for year, posts in archdata.items():
years = [_ for _ in archdata.keys()]
years.sort() # Issue #1833

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jun 18, 2015

Member

What went wrong here?!

Also, why not years = list(archdata.keys())?

for year in years:
posts = archdata[year]

# Filter untranslated posts (Issue #1360)
if not kw["show_untranslated_posts"]:
posts = [p for p in posts if lang in p.translated_to]
Expand Down

0 comments on commit 81c6cfd

Please sign in to comment.