chore: add back json feeds

This commit is contained in:
Cory Dransfeldt 2024-08-10 12:02:51 -07:00
parent 7d78546205
commit 74279cf2d5
No known key found for this signature in database
15 changed files with 91 additions and 53 deletions

View file

@ -0,0 +1,21 @@
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ title }}",
"home_page_url": "{{ permalink | absoluteUrl: globals.url }}",
"feed_url": "{{ permalink | absoluteUrl: globals.url }}.json",
"description": "{{ description }}",
"icon": "https://cdn.coryd.dev/{{ globals.feed_image }}?class=w200&v={% appVersion %}",
"favicon": "https://cdn.coryd.dev/{{ globals.favicon_ico }}?class=w50&v={% appVersion %}",
"items": [
{%- assign entries = data | normalizeEntries: 20 -%}
{%- for entry in entries -%}
{
"id": "{{ entry.url | encodeAmp }}",
"url": "{{ entry.url | encodeAmp }}",
"title": "{{ entry.title | escape }}{%- if entry.authors %} via {{ entry.authors.name }}{%- endif %}{%- if entry.rating %} ({{ entry.rating }}){%- endif %}",
"content_text": "{{ entry.excerpt | escape }}",
"date_published": "{{ entry.date | stringToRFC822Date }}"
}{%- if forloop.last == false %},{%- endif -%}
{%- endfor %}
]
}

View file

@ -10,7 +10,7 @@
<image>
<title>{{ title }}</title>
<link>{{ permalink | absoluteUrl: globals.url }}</link>
<url>https://cdn.coryd.dev/{{ globals.feed_image }}</url>
<url>https://cdn.coryd.dev/{{ globals.feed_image }}?class=w200&v={% appVersion %}</url>
<width>144</width>
<height>144</height>
</image>