Skip to content
Permalink
Browse files
Sort yearly archive task generation.
Resolves #1833.
  • Loading branch information
da2x committed Jun 18, 2015
1 parent 0868c96 commit 81c6cfdf3a863881ecccadab674a342e39c1154d
Showing with 6 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +5 −1 nikola/plugins/task/archive.py
@@ -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)
@@ -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]

0 comments on commit 81c6cfd

Please sign in to comment.