From afc5a45a591fdffe2f998e33c40abc510926463f Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 14 Jul 2023 16:24:11 -0700 Subject: [PATCH] fix: link dates --- src/_data/links.js | 2 +- src/_includes/feeds/links.liquid | 2 +- src/feeds/json/links.11ty.liquid | 2 +- src/feeds/links.liquid | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/_data/links.js b/src/_data/links.js index e92aaeea..9b14f87d 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -15,7 +15,7 @@ module.exports = async function () { return { title: link['title'], url: link['source_url'], - time: link['published_date'], + date: new Date(link['published_date']), summary: link['summary'], id: link['id'], } diff --git a/src/_includes/feeds/links.liquid b/src/_includes/feeds/links.liquid index 26fb21f4..3904e199 100644 --- a/src/_includes/feeds/links.liquid +++ b/src/_includes/feeds/links.liquid @@ -7,7 +7,7 @@ - {% block update %}{{ links[0].time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} + {% block update %}{{ links[0].date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} {{ site.url }} {{ site.name }} diff --git a/src/feeds/json/links.11ty.liquid b/src/feeds/json/links.11ty.liquid index bce4593e..15b4603c 100644 --- a/src/feeds/json/links.11ty.liquid +++ b/src/feeds/json/links.11ty.liquid @@ -13,7 +13,7 @@ permalink: '/links.json' "title": "{{ link.title | escape }}", "url": "{{ link.url }}", "content_text": "{{ link.summary | escape }}", - "date_published": "{{ link.time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}" + "date_published": "{{ link.date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}" }{% if not forloop.last %},{% endif %} {% endfor %} ] diff --git a/src/feeds/links.liquid b/src/feeds/links.liquid index a112f84a..ec107166 100644 --- a/src/feeds/links.liquid +++ b/src/feeds/links.liquid @@ -5,13 +5,13 @@ permalink: /links.xml {% layout "./_includes/feeds/links.liquid" %} {% block title %}Links • Cory Dransfeldt{% endblock %} {% block self %}links.xml{% endblock %} -{% block update %}{{ articles[0].time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} +{% block update %}{{ link[0].date | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} {% block entries %} {% for link in links %} {{ link.title | escape }} - {{ link.time | date: "%m.%d.%Y" }} + {{ link.date | date: "%Y-%m-%dT%H:%M:%S-08:00" }} {{ link.url }}