Skip to content

Commit

Permalink
Renamed rest_deps function, and added language parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 8, 2014
1 parent 300351e commit c70bf5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nikola/plugins/task/posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
from nikola import utils


def rest_deps(post, task):
def update_deps(post, lang, task):
"""Updates file dependencies as they might have been updated during compilation.
This is done for example by the ReST page compiler, which writes its
dependencies into a .dep file. This file is read and incorporated when calling
post.fragment_deps(), and only available /after/ compiling the fragment.
"""
task.file_dep.update(post.fragment_deps(post.default_lang))
task.file_dep.update(post.fragment_deps(lang))


class RenderPosts(Task):
Expand Down Expand Up @@ -69,7 +69,7 @@ def gen_tasks(self):
'file_dep': post.fragment_deps(lang),
'targets': [dest],
'actions': [(post.compile, (lang, )),
(rest_deps, (post,)),
(update_deps, (post, lang, )),
],
'clean': True,
'uptodate': [utils.config_changed(deps_dict, 'nikola.plugins.task.posts')] + post.fragment_deps_uptodate(lang),
Expand Down

0 comments on commit c70bf5f

Please sign in to comment.