diff --git a/feed-json.njk b/feed-json.njk index c84e79c..9f42697 100644 --- a/feed-json.njk +++ b/feed-json.njk @@ -25,7 +25,7 @@ eleventyExcludeFromCollections: true "title": {{ post.data.title | default(post.content | striptags | truncate(80)) | jsonEncode | safe }}, "content_html": {{ post.content | htmlToAbsoluteUrls(absolutePostUrl) | jsonEncode | safe }}, "date_published": "{{ post.date | dateToRfc3339 }}" - {%- if postImage %}, + {%- if postImage and postImage != "" %}, "image": "{{ postImage | url | absoluteUrl(site.url) }}" {%- endif %} }{% if not loop.last %},{% endif %} diff --git a/feed.njk b/feed.njk index 7582d2a..e867fef 100644 --- a/feed.njk +++ b/feed.njk @@ -20,7 +20,7 @@ eleventyExcludeFromCollections: true {{ absolutePostUrl }} {{ post.date | dateToRfc822 }} {{ post.content | htmlToAbsoluteUrls(absolutePostUrl) | escape }} - {%- if postImage %} + {%- if postImage and postImage != "" %} {%- set imageUrl = postImage | url | absoluteUrl(site.url) %}