chore: add links json feed

This commit is contained in:
Cory Dransfeldt 2023-05-26 08:42:21 -07:00
parent 8f14da6567
commit 423e8af092
No known key found for this signature in database
2 changed files with 22 additions and 1 deletions

21
src/links.11ty.liquid Normal file
View file

@ -0,0 +1,21 @@
---
permalink: '/links.json'
---
{% assign links = articles | reverse %}
{
"version": "https://jsonfeed.org/version/1",
"title": "Links • Cory Dransfeldt",
"icon": "https://coryd.dev/static/images/avatar.webp",
"home_page_url": "https://coryd.dev",
"feed_url": "https://coryd.dev/links.json",
"items": [{% for link in links %}
{
"id": "{{ link.href }}",
"title": "{{ link.description | escape }}",
"url": "{{ link.href }}",
"content_text": "",
"date_published": "{{ link.time | date: "%Y-%m-%dT%H:%M:%S-08:00" }}"
}{% if not forloop.last %},{% endif %}
{% endfor %}
]
}