Skip to content
Permalink
Browse files
pagekind style fixes
* flake8
* rename `pages_page` → `story_page`
* I don’t really like the word `pagekind`, btw

cc @Aeyoun

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 12, 2015
1 parent 1526c8d commit ad73baee956799a28e2bedc5ccf50ed67c0c93ab
Showing with 5 additions and 5 deletions.
  1. +2 −2 nikola/nikola.py
  2. +1 −1 nikola/plugins/task/indexes.py
  3. +2 −2 nikola/plugins/task/pages.py
@@ -1536,7 +1536,7 @@ def generic_page_renderer(self, lang, post, filters, context=None):
context['title'] = post.title(lang)
context['description'] = post.description(lang)
context['permalink'] = post.permalink(lang)
if not 'pagekind' in context:
if 'pagekind' not in context:
context['pagekind'] = ['generic_page']
if post.use_in_feeds:
context['enable_comments'] = True
@@ -1825,7 +1825,7 @@ def generic_index_renderer(self, lang, posts, indexes_title, template_name, cont
num_pages = len(lists)
for i, post_list in enumerate(lists):
context = context_source.copy()
if not 'pagekind' in context:
if 'pagekind' not in context:
context['pagekind'] = ['index']
ipages_i = utils.get_displayed_page_number(i, num_pages, self)
if kw["indexes_pages"]:
@@ -116,7 +116,7 @@ def page_path(i, displayed_i, num_pages, force_addition, extension=None):
link = link[:-index_len]
context["permalink"] = link
context["pagekind"] = ["list"]
if dirnme == "/":
if dirname == "/":
context["pagekind"].append("front_page")

for post in post_list:
@@ -50,9 +50,9 @@ def gen_tasks(self):
if not kw["show_untranslated_posts"] and not post.is_translation_available(lang):
continue
if post.is_post:
context = {'pagekind': ['post_page',]}
context = {'pagekind': ['post_page']}
else:
context = {'pagekind': ['pages_page',]}
context = {'pagekind': ['story_page']}
for task in self.site.generic_page_renderer(lang, post, kw["filters"], context):
task['uptodate'] = task['uptodate'] + [config_changed(kw, 'nikola.plugins.task.pages')]
task['basename'] = self.name

0 comments on commit ad73bae

Please sign in to comment.