feat: make json feed reusable
This commit is contained in:
parent
517e849ef5
commit
69a8dfc24f
6 changed files with 27 additions and 19 deletions
|
@ -1,21 +1,11 @@
|
|||
---
|
||||
layout: null
|
||||
permalink: /feeds/follow.json
|
||||
---
|
||||
{% assign posts = follow.posts %}
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1",
|
||||
"title": "All activity • Cory Dransfeldt",
|
||||
"icon": "https://coryd.dev/static/images/avatar.webp",
|
||||
"home_page_url": "https://coryd.dev",
|
||||
"feed_url": "https://coryd.dev/follow.json",
|
||||
"items": [{% for item in posts %}
|
||||
{
|
||||
"id": "{{ item.id }}",
|
||||
"title": "{{ item.title }}",
|
||||
"url": "{{ item.url }}",
|
||||
"content_text": "{{ item.title }} {{ item.url }}",
|
||||
"date_published": "{{ item.date_published | date: "%Y-%m-%dT%H:%M:%S-08:00" }}"
|
||||
}{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
{% render "partials/feeds/json.liquid"
|
||||
permalink:'/feeds/follow'
|
||||
title:'Follow • Cory Dransfeldt'
|
||||
data:follow.posts
|
||||
updated:follow.posts[0].date_published
|
||||
site:site
|
||||
%}
|
Reference in a new issue