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 @@ + +