diff --git a/themes/chameleon/scripts/feed/.atom.xml b/themes/chameleon/scripts/feed/.atom.xml index e44ed95..672e25b 100644 --- a/themes/chameleon/scripts/feed/.atom.xml +++ b/themes/chameleon/scripts/feed/.atom.xml @@ -6,7 +6,7 @@ {% if config.feed.hub %}{% endif %} - {% if posts.first().updated %}{{ posts.first().updated | date }}{% else %}{{ posts.first().date | date }}{% endif %} + {% if posts.first().updated %}{{ posts.first().updated | formatDate }}{% else %}{{ posts.first().date | formatDate }}{% endif %} {{ url | uriencode }} {% if config.author %} @@ -20,8 +20,8 @@ {{ post.title }} {{ post.permalink }} - {{ post.date.toISOString() }} - {% if post.updated %}{{ post.updated | date }}{% else %}{{ post.date | date }}{% endif %} + {{ post.date | formatDate }} + {% if post.updated %}{{ post.updated | formatDate }}{% else %}{{ post.date | formatDate }}{% endif %} {% if config.feed.content and post.content %} {% endif %} diff --git a/themes/chameleon/scripts/feed/generator.js b/themes/chameleon/scripts/feed/generator.js index 71c1b74..563ac9e 100644 --- a/themes/chameleon/scripts/feed/generator.js +++ b/themes/chameleon/scripts/feed/generator.js @@ -16,7 +16,7 @@ env.addFilter('noControlChars', str => { return str.replace(/[\x00-\x1F\x7F]/g, '') // eslint-disable-line no-control-regex }) -env.addFilter('date', str => { +env.addFilter('formatDate', str => { return moment(str).format('YYYY-MM-DD[T00:00:00.000Z]') })