Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 08, 2017
jsonfeed: don’t crash if there is no 'pagekind'
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
projectpages: provide pagekind
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@@ -7,6 +7,6 @@ PluginCategory = Task
[Documentation]
Author = Chris Warrick
-Version = 0.1.0
+Version = 0.1.1
Website = https://jsonfeed.org/
Description = Generate JSON Feeds for a Nikola blog.
View
@@ -183,6 +183,8 @@ def get_link(self, path_handler, classification, lang):
def jsonfeed_html_link(self, site, context):
"""Generate HTML fragment with link to JSON feed."""
+ if 'pagekind' not in context:
+ return ''
pagekind = context['pagekind']
lang = context['lang']
fragment = '<link rel="alternate" type="application/json" title="{title}" href="{url}">\n'
@@ -8,6 +8,6 @@ MinVersion = 7.1.0+
[Documentation]
Author = Chris Warrick
-Version = 0.1.10
+Version = 0.1.11
Website = https://chriswarrick.com/projects/
Description = Generate project pages
@@ -150,6 +150,8 @@ def sortf(p):
link = link[:-index_len]
context["permalink"] = '/' + link
+ context["pagekind"] = ['projectpages']
+
all_meta = [(p.title(), p.meta('status')) for p in self.projects]
all_meta += [p.meta('previewimage') for p in context["featured"]]
all_meta += [p.source_path for p in context["featured"]]

No commit comments for this range