Add json-feed support
This commit is contained in:
parent
6d51f2696e
commit
8bffb37581
@ -6,6 +6,10 @@
|
||||
|
||||
{%seo%}
|
||||
|
||||
<!-- Discovery -->
|
||||
<link rel="alternate" title="{{site.title}}" type="application/rss+xml" href="{{site.url}}/feed.xml" />
|
||||
<link rel="alternate" title="{{site.title}}" type="application/json" href="{{site.url}}/feed.json" />
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||
|
24
feed.json
Normal file
24
feed.json
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
---
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1",
|
||||
"title": "{{site.title}}",
|
||||
"home_page_url": "{{site.url}}",
|
||||
"feed_url": "{{site.url}}/feed.json",
|
||||
"items": [
|
||||
{% assign i = site.posts | size %}
|
||||
{% for post in site.posts %}
|
||||
{
|
||||
"id":{{i}},
|
||||
"content_html":"{{post.excerpt | replace: '"', "'" | strip | strip_newlines}}",
|
||||
"url":"{{site.url}}{{post.url}}"
|
||||
},
|
||||
{% assign i = i | minus:1 %}
|
||||
{% endfor %}
|
||||
{
|
||||
"id":0,
|
||||
"content_text":"",
|
||||
"url":"{{site.url}}"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user