chore: fixes + update

This commit is contained in:
Cory Dransfeldt 2024-08-15 11:42:04 -07:00
parent ea67473957
commit 537109b071
No known key found for this signature in database
14 changed files with 35 additions and 9 deletions

View file

@ -15,10 +15,15 @@
{%- assign entries = data | normalizeEntries: 20 -%}
{%- for entry in entries -%}
{%- assign summary = entry.content | strip_html | normalize_whitespace | escape -%}
{%- assign utm_parameters = "utm_source=rss&utm_medium=feed&utm_campaign=" | append: utm_campaign -%}
{
"id": "{{ entry.url | encodeAmp | escape }}",
"title": "{{ entry.title | escape }}{% if entry.authors %} via {{ entry.authors.name | escape }}{% endif %}{% if entry.rating %} ({{ entry.rating | escape }}){% endif %}",
"url": "{{ entry.url | encodeAmp | escape }}",
{%- if utm_campaign -%}
"url": "{{ entry.url | append: '?' | append: utm_parameters }}",
{%- else -%}
"url": "{{ entry.url | encodeAmp }}",
{%- endif -%}
"content_html": "{{ summary }}",
"summary": "{{ summary }}",
{%- if entry.author -%}

View file

@ -22,9 +22,14 @@
{%- if entry.authors %} via {{ entry.authors.name }}{%- endif -%}
{%- if rating %} ({{ rating }}){%- endif -%}
{%- endcapture -%}
{%- assign utm_parameters = "utm_source=rss&utm_medium=feed&utm_campaign=" | append: utm_campaign -%}
<item>
<title><![CDATA[{{ entryTitle }}]]></title>
{%- if utm_campaign -%}
<link>{{ entry.url | append: '?' | append: utm_parameters | encodeAmp }}</link>
{%- else -%}
<link>{{ entry.url | encodeAmp }}</link>
{%- endif -%}
<pubDate>{{ entry.date | stringToRFC822Date }}</pubDate>
<guid isPermaLink="false">{{ entry.url | encodeAmp }}</guid>
{%- if entry.image -%}