fix: json feed date

This commit is contained in:
Cory Dransfeldt 2024-08-10 16:26:03 -07:00
parent 7e55338697
commit dc9d5de0e9
No known key found for this signature in database
3 changed files with 15 additions and 19 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "21.10.0", "version": "21.10.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "21.10.0", "version": "21.10.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/api-text": "^1.4.0", "@cdransf/api-text": "^1.4.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "21.10.0", "version": "21.10.1",
"description": "The source for my personal site. Built using 11ty (and other tools).", "description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -6,13 +6,11 @@
"description": "{{ globals.site_description | escape }}", "description": "{{ globals.site_description | escape }}",
"icon": "https://cdn.coryd.dev/{{ globals.feed_image | escape }}?class=w200&v={% appVersion %}", "icon": "https://cdn.coryd.dev/{{ globals.feed_image | escape }}?class=w200&v={% appVersion %}",
"favicon": "https://cdn.coryd.dev/{{ globals.favicon_ico | escape }}?class=w50&v={% appVersion %}", "favicon": "https://cdn.coryd.dev/{{ globals.favicon_ico | escape }}?class=w50&v={% appVersion %}",
"authors": [ "authors": [{
{
"name": "{{ globals.site_name }}", "name": "{{ globals.site_name }}",
"url": "{{ globals.url | escape }}", "url": "{{ globals.url | escape }}",
"avatar": "https://cdn.coryd.dev/{{ globals.avatar | escape }}?class=w200&v={% appVersion %}" "avatar": "https://cdn.coryd.dev/{{ globals.avatar | escape }}?class=w200&v={% appVersion %}"
} }],
],
"items": [ "items": [
{%- assign entries = data | normalizeEntries: 20 -%} {%- assign entries = data | normalizeEntries: 20 -%}
{%- for entry in entries -%} {%- for entry in entries -%}
@ -25,16 +23,14 @@
"summary": "{{ summary }}", "summary": "{{ summary }}",
{%- if entry.author -%} {%- if entry.author -%}
"external_url": "{{ entry.url | encodeAmp | escape }}", "external_url": "{{ entry.url | encodeAmp | escape }}",
"authors": [ "authors": [{
{
"name": "{{ entry.author.name | escape }}", "name": "{{ entry.author.name | escape }}",
"url": "{{ entry.author.url | escape }}", "url": "{{ entry.author.url | escape }}",
"mastodon": "{{ entry.author.mastodon | escape }}", "mastodon": "{{ entry.author.mastodon | escape }}",
"rss": "{{ entry.author.feed | escape }}" "rss": "{{ entry.author.feed | escape }}"
} }],
],
{%- endif %} {%- endif %}
"date_published": "{{ entry.date | stringToRFC822Date }}"{%- if entry.tags -%}, "date_published": "{{ entry.date | date: '%Y-%m-%dT%H:%M:%S%:z' }}"{%- if entry.tags -%},
"tags": [ "tags": [
{%- for tag in entry.tags -%} {%- for tag in entry.tags -%}
"{{ tag | escape }}"{%- unless forloop.last -%}, {% endunless -%} "{{ tag | escape }}"{%- unless forloop.last -%}, {% endunless -%}