chore: fixes + update
This commit is contained in:
parent
ea67473957
commit
537109b071
14 changed files with 35 additions and 9 deletions
|
@ -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 -%}
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
Reference in a new issue