From f6f12155da08d2525258f5a89f9c67390ea2a9cb Mon Sep 17 00:00:00 2001 From: Danny Staple Date: Fri, 18 Oct 2024 21:57:35 +0100 Subject: [PATCH 1/2] Eliminate the whitespace --- navigation_and_indexes/rss.liquid | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/navigation_and_indexes/rss.liquid b/navigation_and_indexes/rss.liquid index 81a18a93..4d6c9bf0 100644 --- a/navigation_and_indexes/rss.liquid +++ b/navigation_and_indexes/rss.liquid @@ -4,8 +4,8 @@ permalink: /rss.xml theme: name: orionrobots --- -{% capture BASE_PATH %}{{ site.production_url }}{% endcapture %} -{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ theme.name }}{% endcapture %} +{%- capture BASE_PATH %}{{ site.production_url }}{% endcapture -%} +{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ theme.name }}{% endcapture -%} @@ -22,9 +22,8 @@ theme: {{ site.title }} {{ site.production_url }} - -{% assign posts = collections.all | reverse | with_explicit_date %} -{% for post in posts %} +{%- assign posts = collections.all | reverse | with_explicit_date -%} +{%- for post in posts -%} {{ post.title }} {{ post | excerpt | strip_html }} @@ -32,7 +31,6 @@ theme: {{ site.production_url }}{{ post.url }} {{ post.date }} -{% endfor %} - +{%- endfor -%} From 8ab198e91c31151c71c12cdb635959da40a6cdd3 Mon Sep 17 00:00:00 2001 From: Danny Staple Date: Fri, 18 Oct 2024 22:05:47 +0100 Subject: [PATCH 2/2] This validates --- .eleventy.js | 1 + navigation_and_indexes/rss.liquid | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 5e63a179..85d0e797 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -119,6 +119,7 @@ module.exports = function(eleventyConfig) { }); // Liquid filter to convert a date to a string + eleventyConfig.addLiquidFilter("to_utc_string", date => date.toUTCString() ); // Liquid filter for long date string eleventyConfig.addLiquidFilter("date_to_long_string", function(date) { diff --git a/navigation_and_indexes/rss.liquid b/navigation_and_indexes/rss.liquid index 4d6c9bf0..40175a81 100644 --- a/navigation_and_indexes/rss.liquid +++ b/navigation_and_indexes/rss.liquid @@ -11,11 +11,10 @@ theme: {{ site.title }} {{ site.title }} - {{ site.tagline }} - {{ site.production_url }}{{ JB.rss_path }} {{ site.production_url }} en-gb - {{ now | date_to_long_string }} - {{ time }} + {{ now | to_utc_string }} + {{ now | to_utc_string }} 1800 {{ ASSET_PATH }}/images/social-banner.jpg @@ -25,11 +24,11 @@ theme: {%- assign posts = collections.all | reverse | with_explicit_date -%} {%- for post in posts -%} - {{ post.title }} + {{ post.data.title }} {{ post | excerpt | strip_html }} {{ site.production_url }}{{ post.url }} {{ site.production_url }}{{ post.url }} - {{ post.date }} + {{ post.date | to_utc_string }} {%- endfor -%}