chore: add links json feed
This commit is contained in:
parent
8f14da6567
commit
423e8af092
2 changed files with 22 additions and 1 deletions
|
@ -25,5 +25,5 @@ class="m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 m
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
- Posts ([RSS](/feed.xml) • [JSON](/feed.json)): a feed of all of my blog posts.
|
- Posts ([RSS](/feed.xml) • [JSON](/feed.json)): a feed of all of my blog posts.
|
||||||
- Links ([RSS](/links.xml)): a feed of links I've shared via the Pinboard API.
|
- Links ([RSS](/links.xml) • [JSON](/links.json)): a feed of links I've shared via the Pinboard API.
|
||||||
- Follow ([JSON](/follow.json)): a JSON feed of my web activity comprised of blog posts, links, movies and books (using the same data sources as [my now page](/now)).
|
- Follow ([JSON](/follow.json)): a JSON feed of my web activity comprised of blog posts, links, movies and books (using the same data sources as [my now page](/now)).
|
||||||
|
|
21
src/links.11ty.liquid
Normal file
21
src/links.11ty.liquid
Normal 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 %}
|
||||||
|
]
|
||||||
|
}
|
Reference in a new issue