diff options
Diffstat (limited to 'nikola/plugins/task/archive.py')
| -rw-r--r-- | nikola/plugins/task/archive.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nikola/plugins/task/archive.py b/nikola/plugins/task/archive.py index 3afbea1..a65a63f 100644 --- a/nikola/plugins/task/archive.py +++ b/nikola/plugins/task/archive.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2013 Roberto Alsina and others. +# Copyright © 2012-2014 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -92,7 +92,8 @@ class Archive(Task): kw['filters'], context, ) - task_cfg = {1: task['uptodate'][0].config, 2: kw} + n = len(post_list) if 'posts' in context else len(months) + task_cfg = {1: task['uptodate'][0].config, 2: kw, 3: n} task['uptodate'] = [config_changed(task_cfg)] task['basename'] = self.name yield task @@ -123,7 +124,7 @@ class Archive(Task): kw['filters'], context, ) - task_cfg = {1: task['uptodate'][0].config, 2: kw} + task_cfg = {1: task['uptodate'][0].config, 2: kw, 3: len(post_list)} task['uptodate'] = [config_changed(task_cfg)] task['basename'] = self.name yield task @@ -151,7 +152,7 @@ class Archive(Task): kw['filters'], context, ) - task_cfg = {1: task['uptodate'][0].config, 2: kw} + task_cfg = {1: task['uptodate'][0].config, 2: kw, 3: len(years)} task['uptodate'] = [config_changed(task_cfg)] task['basename'] = self.name yield task |
