Skip to content
Permalink
Browse files
Fixed #1833.
  • Loading branch information
felixfontein committed Jun 18, 2015
1 parent c51d8c3 commit d93e32bd4438bbec67dcea3e226d609cd730d5cf
Showing with 5 additions and 6 deletions.
  1. +5 −6 nikola/plugins/task/archive.py
@@ -24,6 +24,7 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import copy
import os

# for tearDown with _reload we cannot use 'import from' to access LocaleBorg
@@ -72,7 +73,7 @@ def _prepare_task(self, kw, name, lang, posts, items, template_name,
context,
)

task_cfg = {1: kw, 2: n}
task_cfg = {1: copy.copy(kw), 2: n}
if deps_translatable is not None:
task_cfg[3] = deps_translatable
task['uptodate'] = task['uptodate'] + [config_changed(task_cfg, 'nikola.plugins.task.archive')]
@@ -144,11 +145,7 @@ def gen_tasks(self):
# if we are creating one single archive, or full archives
archdata[None] = self.site.posts # for create_single_archive

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

for year, posts in archdata.items():
# Filter untranslated posts (Issue #1360)
if not kw["show_untranslated_posts"]:
posts = [p for p in posts if lang in p.translated_to]
@@ -204,6 +201,8 @@ def gen_tasks(self):

if not kw['create_single_archive'] and not kw['create_full_archives']:
# And an "all your years" page for yearly and monthly archives
if "is_feed_stale" in kw:
del kw["is_feed_stale"]
years = list(self.site.posts_per_year.keys())
years.sort(reverse=True)
kw['years'] = years

0 comments on commit d93e32b

Please sign in to comment.