aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/task_render_pages.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2013-05-30 17:41:32 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2013-05-30 17:41:32 -0300
commit47320d60c110fe6058937f996da750caf669d7ed (patch)
tree73288c7b833daa42ac200025ed41c940cc8a76f9 /nikola/plugins/task_render_pages.py
parent432fee57865e02af455e877a9597ef730397146c (diff)
parentf794eee787e9cde54e6b8f53e45d69c9ddc9936a (diff)
Merge tag 'upstream/5.4.4'
Upstream version 5.4.4
Diffstat (limited to 'nikola/plugins/task_render_pages.py')
-rw-r--r--nikola/plugins/task_render_pages.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nikola/plugins/task_render_pages.py b/nikola/plugins/task_render_pages.py
index 0145579..1883d7b 100644
--- a/nikola/plugins/task_render_pages.py
+++ b/nikola/plugins/task_render_pages.py
@@ -22,6 +22,7 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import unicode_literals
from nikola.plugin_categories import Task
from nikola.utils import config_changed
@@ -37,17 +38,21 @@ class RenderPages(Task):
"post_pages": self.site.config["post_pages"],
"translations": self.site.config["TRANSLATIONS"],
"filters": self.site.config["FILTERS"],
+ "hide_untranslated_posts": self.site.config['HIDE_UNTRANSLATED_POSTS'],
}
self.site.scan_posts()
flag = False
for lang in kw["translations"]:
for post in self.site.timeline:
+ if kw["hide_untranslated_posts"] and not post.is_translation_available(lang):
+ continue
for task in self.site.generic_page_renderer(lang, post,
kw["filters"]):
task['uptodate'] = [config_changed({
1: task['uptodate'][0].config,
2: kw})]
task['basename'] = self.name
+ task['task_dep'] = ['render_posts']
flag = True
yield task
if flag is False: # No page rendered, yield a dummy task