Created
May 20, 2017 17:40
-
-
Save jordanmerrick/ac3e2ecff70ad0c2142037805f286e0f to your computer and use it in GitHub Desktop.
JSON feed template for Jekyll.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: null | |
--- | |
{ | |
"version": "https://jsonfeed.org/version/1", | |
"title": "{{ site.title | xml_escape }}", | |
"home_page_url": "{{ site.url }}", | |
"icon": "{{site.url }}/media/icons/apple-touch-icon.png", | |
"favicon": "{{ site.url }}/media/icons/favicon.ico", | |
"feed_url": "{{ site.url }}/feed.json", | |
"author": { | |
"name": "Jordan Merrick", | |
"url": "https://twitter.com/jordanmerrick" | |
}, | |
"items": [ | |
{% for post in site.posts limit:10 %} | |
{ | |
"title": {{ post.title | jsonify }}, | |
"id": "{{ post.url | prepend: site.baseurl | prepend: site.url }}", | |
"date_published": "{{ post.date | date_to_xmlschema }}", | |
"date_modified": "{{ post.date | date_to_xmlschema }}", | |
"url": "{{ post.url | prepend: site.baseurl | prepend: site.url }}", | |
{% if post.link != null %} | |
"external_url": "{{ post.link }}", | |
{% endif %} | |
"content_html": {{ post.content | strip_newlines | jsonify }} | |
}{% if forloop.last == false %},{% endif %} | |
{% endfor %} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment