Skip to content
Permalink
Browse files

Address review comments

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 13, 2018
1 parent faafa06 commit 5525d736a3cd197a7fe3ec5a8aaebf247b542ee7
Showing with 6 additions and 1 deletion.
  1. +3 −0 nikola/nikola.py
  2. +3 −1 nikola/plugins/task/indexes.py
@@ -2484,6 +2484,9 @@ def generic_index_renderer(self, lang, posts, indexes_title, template_name, cont
as the ones for page_link.
additional_dependencies: a list of dependencies which will be added
to task['uptodate']
Note: if context['featured'] is present, it must be a list of posts,
whose dependencies will be taken added to task['uptodate'].
"""
# Update kw
kw = kw.copy()
@@ -112,12 +112,14 @@ def get_path(self, classification, lang, dest_type='page'):
def provide_context_and_uptodate(self, classification, lang, node=None):
"""Provide data for the context and the uptodate list for the list of the given classifiation."""
kw = {
"show_untranslated_posts": self.site.config["SHOW_UNTRANSLATED_POSTS"],
}
context = {
"title": self.site.config["INDEXES_TITLE"](lang) or self.site.config["BLOG_TITLE"](lang),
"description": self.site.config["BLOG_DESCRIPTION"](lang),
"pagekind": ["main_index", "index"],
"featured": [p for p in self.site.posts if p.post_status == 'featured' and lang in p.translated_to],
"featured": [p for p in self.site.posts if p.post_status == 'featured'
and (lang in p.translated_to or kw["show_untranslated_posts"])],
}
kw.update(context)
return context, kw

0 comments on commit 5525d73

Please sign in to comment.
You can’t perform that action at this time.