fix: old syndication flow

This commit is contained in:
Cory Dransfeldt 2024-04-20 10:46:18 -07:00
parent 87fd1f589e
commit c2289e488d
18 changed files with 12825 additions and 4 deletions

View file

@ -0,0 +1,12 @@
---
layout: null
eleventyExcludeFromCollections: true
permalink: /feeds/follow.json
---
{% render "partials/feeds/json.liquid"
permalink:'/feeds/follow'
title:'Follow • Cory Dransfeldt'
data:follow.posts
updated:follow.posts[0].date_published
site:site
%}

18
src/feeds/json.liquid Normal file
View file

@ -0,0 +1,18 @@
{%- assign entries = data | normalizeEntries -%}
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ title }}",
"icon": "https://coryd.dev/assets/img/avatar.png",
"home_page_url": "{{ meta.url }}",
"feed_url": "{{ permalink | absoluteUrl: meta.url }}",
"items": [{% for entry in entries limit: 20 -%}
{
"id": "{{ entry.url | btoa }}",
"title": "{{ entry.title | replaceQuotes }}",
"url": "{{ entry.url }}",
"content_text": "{{ entry.title | replaceQuotes }}{% if tagMap %} {{ entry.url | tagLookup: tagMap }}{% endif %} {{ entry.url }}",
"date_published": "{{ entry.date | stringToRFC822Date }}"
}{% if not forloop.last %},{% endif %}
{%- endfor %}
]
}

View file

@ -0,0 +1,13 @@
---
layout: null
eleventyExcludeFromCollections: true
permalink: /feeds/share-follow.json
---
{% render "partials/feeds/json.liquid"
permalink:'/feeds/share-follow.json'
title:'Follow • Cory Dransfeldt'
data:follow.posts
updated:follow.posts[0].date_published
site:site
tagMap:collections.tagMap
%}