aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/task/posts.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-06-13 21:51:04 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-06-13 21:51:04 -0300
commit3dddbd8cc879402c2047919bccd20e6697082657 (patch)
tree38d6290f37be1d67d91c46027974e6ee3372e232 /nikola/plugins/task/posts.py
parent7ac2cf148f7a8ea0de126fed3360b49964ce9b45 (diff)
parent58c4878526dec5510f23c812274686787d8724ba (diff)
Merge tag 'upstream/7.0.1'
Upstream version 7.0.1
Diffstat (limited to 'nikola/plugins/task/posts.py')
-rw-r--r--nikola/plugins/task/posts.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/nikola/plugins/task/posts.py b/nikola/plugins/task/posts.py
index a502b81..8e03122 100644
--- a/nikola/plugins/task/posts.py
+++ b/nikola/plugins/task/posts.py
@@ -25,12 +25,20 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from copy import copy
-import nikola.post
from nikola.plugin_categories import Task
from nikola import utils
+def rest_deps(post, task):
+ """Add extra_deps from ReST into task.
+
+ The .dep file is created by ReST so not available before the task starts
+ to execute.
+ """
+ task.file_dep.update(post.extra_deps())
+
+
class RenderPosts(Task):
"""Build HTML fragments from metadata and text."""
@@ -43,10 +51,10 @@ class RenderPosts(Task):
"translations": self.site.config["TRANSLATIONS"],
"timeline": self.site.timeline,
"default_lang": self.site.config["DEFAULT_LANG"],
- "hide_untranslated_posts": self.site.config['HIDE_UNTRANSLATED_POSTS'],
+ "show_untranslated_posts": self.site.config['SHOW_UNTRANSLATED_POSTS'],
+ "demote_headers": self.site.config['DEMOTE_HEADERS'],
}
- nikola.post.READ_MORE_LINK = self.site.config['READ_MORE_LINK']
yield self.group_task()
for lang in kw["translations"]:
@@ -59,7 +67,9 @@ class RenderPosts(Task):
'name': dest,
'file_dep': post.fragment_deps(lang),
'targets': [dest],
- 'actions': [(post.compile, (lang, ))],
+ 'actions': [(post.compile, (lang, )),
+ (rest_deps, (post,)),
+ ],
'clean': True,
'uptodate': [utils.config_changed(deps_dict)],
}