diff --git a/.eleventy.js b/.eleventy.js index fd0b7e6..35e3615 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -62,6 +62,8 @@ function addShortcodes(eleventyConfig) { function addFilters(eleventyConfig) { eleventyConfig.addFilter("formatDate", formatDateFilter) eleventyConfig.addFilter("dateISOString", dateISOStringFilter) + eleventyConfig.addFilter("dateObj", (value) => new Date(value)) + eleventyConfig.addFilter("log", (value) => { console.log(`[11ty] 📄LOG: `, value); return value }) eleventyConfig.addFilter("concat", (value, other) => value + '' + other) eleventyConfig.addNunjucksAsyncFilter("await", (promise) => promise.then(res => callback(null, res)).catch(err => callback(err))) } diff --git a/_content/atom.njk b/_content/atom.njk index 1712210..e053b60 100644 --- a/_content/atom.njk +++ b/_content/atom.njk @@ -15,9 +15,8 @@ {{ ACTOR.name }}'s feed {{ metadata.subtitle }} - - {{ collections.feed[0].date | dateToRfc822 }} - {{ ACTOR.url }} + {{ collections.feed[0].date | dateToRfc3339 }} + {{ ACTOR.id | absoluteUrl(ACTOR.url) }} {{ ACTOR.name }} @@ -26,7 +25,7 @@ {{ post.data.title }} - {{ post.date | dateToRfc822 }} + {{ post.data.published | dateObj | dateToRfc3339 }} {{ absolutePostUrl }} {{ summaryMacro(post.data, post.url) | htmlToAbsoluteUrls(absolutePostUrl) }} diff --git a/_content/json.njk b/_content/json.njk index e4dfd6e..623d805 100644 --- a/_content/json.njk +++ b/_content/json.njk @@ -13,12 +13,12 @@ "version": "https://jsonfeed.org/version/1.1", "title": "{{ ACTOR.name }}'s feed", "language": "{{ metadata.language }}", - "home_page_url": "{{ ACTOR.url }}", + "home_page_url": "{{ ACTOR.url }}/", "feed_url": "{{ permalink | absoluteUrl(ACTOR.url) }}", "description": "{{ metadata.subtitle }}", "author": { "name": "{{ ACTOR.name }}", - "url": "{{ ACTOR.url }}" + "url": "{{ ACTOR.url }}/" }, "items": [ {%- for post in collections.feed %} @@ -28,7 +28,7 @@ "url": "{{ absolutePostUrl }}", "title": "{{ post.data.title }}", "content_html": {{ summaryMacro(post.data, post.url) | concat(post.templateContent) | htmlToAbsoluteUrls(absolutePostUrl) | dump | safe }}, - "date_published": "{{ post.date | dateToRfc3339 }}" + "date_published": "{{ post.data.published | dateObj | dateToRfc3339 }}" } {% if not loop.last %},{% endif %} {%- endfor %} diff --git a/_content/rss.njk b/_content/rss.njk index 9945f45..115fc47 100644 --- a/_content/rss.njk +++ b/_content/rss.njk @@ -27,7 +27,7 @@ {{ summaryMacro(post.data, post.url) | htmlToAbsoluteUrls(absolutePostUrl) }} {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} - {{ post.date | dateToRfc822 }} + {{ post.data.published | dateObj | dateToRfc822 }} {{ ACTOR.name }} {{ absolutePostUrl }} diff --git a/bun.lockb b/bun.lockb index 1a02095..941a179 100755 Binary files a/bun.lockb and b/bun.lockb differ