-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed.json
More file actions
40 lines (40 loc) · 1.47 KB
/
feed.json
File metadata and controls
40 lines (40 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
layout: null
---
{
"version": "https://jsonfeed.org/version/1.1",
"title": {{ site.title | jsonify }},
"home_page_url": {{ "/" | absolute_url | jsonify }},
"feed_url": {{ page.url | absolute_url | jsonify }},
"description": {{ site.description | jsonify }},
"icon": {{ site.logo | absolute_url | jsonify }},
"authors": [
{
"name": {{ site.author.name | default: site.author | jsonify }},
"url": {{ "/" | absolute_url | jsonify }}
}
],
"items": [
{% for post in site.posts limit: 20 %}
{
"id": {{ post.id | absolute_url | jsonify }},
"url": {{ post.url | absolute_url | jsonify }},
"title": {{ post.title | jsonify }},
"content_html": {{ post.content | jsonify }},
"summary": {{ post.excerpt | strip_html | jsonify }},
"date_published": {{ post.date | date_to_xmlschema | jsonify }},
"date_modified": {{ post.last_modified_at | default: post.date | date_to_xmlschema | jsonify }},
{% assign feed_image = post.image | default: post.header.og_image | default: site.og_image %}
{% if feed_image %}
"image": {{ feed_image | absolute_url | jsonify }},
{% endif %}
"authors": [
{
"name": {{ post.author | default: site.author.name | default: site.author | jsonify }}
}
],
"tags": [{% for tag in post.tags %}{{ tag | jsonify }}{% unless forloop.last %},{% endunless %}{% endfor %}]
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}