Permalink
Browse files

jsonfeed: depend on taxonomies and make dirs

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed May 22, 2017
1 parent e55b72b commit 83ac1fdc38adf99272d0c5d4d0eb8f812abfdd78
Showing with 3 additions and 2 deletions.
  1. +3 −2 v7/jsonfeed/jsonfeed.py
View
@@ -181,7 +181,6 @@ def get_link(self, path_handler, classification, lang):
"""Get link for a page."""
return urljoin(self.site.config['BASE_URL'], self.site.link(path_handler, classification, lang).lstrip('/'))
-
def jsonfeed_html_link(self, site, context):
"""Generate HTML fragment with link to JSON feed."""
pagekind = context['pagekind']
@@ -244,7 +243,7 @@ def generate_feed_task(self, lang, title, link, description, timeline,
'name': str(output_name),
'targets': [output_name],
'file_dep': deps,
- 'task_dep': ['render_posts'],
+ 'task_dep': ['render_posts', 'render_taxonomies'],
'actions': [(self.generate_feed, (lang, title, link, description,
timeline, feed_url, output_name,
primary_author))],
@@ -338,5 +337,7 @@ def generate_feed(self, lang, title, link, description, timeline,
"items": items
}
+ utils.makedirs(os.path.dirname(output_name))
+
with io.open(output_name, 'w', encoding='utf-8') as fh:
json.dump(feed, fh, ensure_ascii=False, indent=4)

0 comments on commit 83ac1fd

Please sign in to comment.