feat: formatted + cleaned up feeds

This commit is contained in:
Cory Dransfeldt 2024-08-10 14:32:59 -07:00
parent 74279cf2d5
commit 7934cc3581
No known key found for this signature in database
16 changed files with 367 additions and 33 deletions

View file

@ -1,31 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="/assets/styles/feed.xsl" type="text/xsl" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{{ permalink | absoluteUrl: globals.url }}" rel="self" type="application/rss+xml" />
<feedUrl>{{ permalink | absoluteUrl: globals.url }}</feedUrl>
{%- assign entries = data | normalizeEntries: 20 -%}
<title>{{ title }}</title>
<description>{{ description }}</description>
<title><![CDATA[{{ title }}]]></title>
<description><![CDATA[{{ description }}]]></description>
<link>{{ permalink | absoluteUrl: globals.url }}</link>
<lastBuildDate>{{ updated | stringToRFC822Date }}</lastBuildDate>
<image>
<title>{{ title }}</title>
<title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl: globals.url }}</link>
<url>https://cdn.coryd.dev/{{ globals.feed_image }}?class=w200&v={% appVersion %}</url>
<url>{{ "https://cdn.coryd.dev/" | append: globals.feed_image | append: "?class=w200&amp;v=" | append: appVersion }}</url>
<width>144</width>
<height>144</height>
</image>
{% for entry in entries -%}
{%- assign rating = entry.rating -%}
{%- capture entryTitle -%}
{{ entry.title | escape }}
{{ entry.title }}
{%- if entry.authors %} via {{ entry.authors.name }}{%- endif -%}
{%- if rating %} ({{ rating }}){%- endif -%}
{%- endcapture -%}
<item>
<title>{{ entryTitle }}</title>
<title><![CDATA[{{ entryTitle }}]]></title>
<link>{{ entry.url | encodeAmp }}</link>
<pubDate>{{ entry.date | stringToRFC822Date }}</pubDate>
<guid>{{ entry.url | encodeAmp }}</guid>
<guid isPermaLink="false">{{ entry.url | encodeAmp }}</guid>
<description>{{ entry.excerpt | escape }}</description>
</item>
{%- endfor %}