From bdaf43ad162f2478f56e0932a2b43f0baf2e0e49 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Tue, 30 Apr 2024 11:37:29 +0100 Subject: [PATCH] Fix my broken JSON, again --- src/feeds/json.njk | 2 +- src/feeds/tags/json.njk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/feeds/json.njk b/src/feeds/json.njk index cff2498..7e5e9c6 100644 --- a/src/feeds/json.njk +++ b/src/feeds/json.njk @@ -28,7 +28,7 @@ "content_html": {% if post.templateContent %}{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | dump | safe }}{% else %}""{% endif %}, "date_published": "{{ post.date | dateToRfc3339 }}", "tags": {{ post.data.tags | except("posts") | json | safe }}, - "summary": "{{ post | excerpt }}" + "summary": {{ post | excerpt | json | safe }} } {% if not loop.last %},{% endif %} {%- endfor %} diff --git a/src/feeds/tags/json.njk b/src/feeds/tags/json.njk index b29238c..693cc2e 100644 --- a/src/feeds/tags/json.njk +++ b/src/feeds/tags/json.njk @@ -30,7 +30,7 @@ eleventyImport: "content_html": {% if post.templateContent %}{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | dump | safe }}{% else %}""{% endif %}, "date_published": "{{ post.date | dateToRfc3339 }}", "tags": {{ post.data.tags | except("posts") | json | safe }}, - "summary": "{{ post | excerpt }}" + "summary": {{ post | excerpt | json | safe }} } {% if not loop.last %},{% endif %} {%- endfor %}