From 9b17dc6d1831acf20197b701b82085df95e13b83 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 15 Mar 2023 16:33:42 -0700 Subject: [PATCH] styled feed; bug fixes --- config/dateFilters.js | 4 ++ config/rssLastUpdated.js | 6 +++ src/_includes/base.liquid | 2 + src/_includes/feed.liquid | 16 ++++++ src/_includes/icons/coffee.liquid | 2 +- src/_includes/nav.liquid | 2 +- src/assets/atom-feed.xsl | 89 +++++++++++++++++++++++++++++++ src/feed.11ty.liquid | 3 +- src/feeds/all.liquid | 22 ++++++++ 9 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 config/rssLastUpdated.js create mode 100644 src/_includes/feed.liquid create mode 100644 src/assets/atom-feed.xsl create mode 100644 src/feeds/all.liquid diff --git a/config/dateFilters.js b/config/dateFilters.js index 83ddcf88..d86dfd29 100644 --- a/config/dateFilters.js +++ b/config/dateFilters.js @@ -37,4 +37,8 @@ module.exports = { return [month, day, year].join('.') }, + rssLastUpdatedDate: (collection) => { + if (!collection || !collection.length) return '' + return collection[0].publishedAt + }, } diff --git a/config/rssLastUpdated.js b/config/rssLastUpdated.js new file mode 100644 index 00000000..0c1749f9 --- /dev/null +++ b/config/rssLastUpdated.js @@ -0,0 +1,6 @@ +const { DateTime } = require('luxon') + +module.exports = (collection) => { + if (!collection || !collection.length) return '' + return collection[0].publishedAt +} diff --git a/src/_includes/base.liquid b/src/_includes/base.liquid index fb55a189..45a9830f 100644 --- a/src/_includes/base.liquid +++ b/src/_includes/base.liquid @@ -21,6 +21,8 @@ + +