Skip to content

Commit

Permalink
Create feed.json
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb authored May 26, 2017
1 parent 122fb7d commit 74620e8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions feed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
layout: null

# thanks to Alexandre Vallières-Lagacé
# copied from repo; see https://github.com/vallieres/jekyll-json-feed
---
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ site.title | xml_escape }}",
"home_page_url": "{{ "/" | absolute_url }}",
"feed_url": "{{ "/feed.json" | absolute_url }}",
"description": {{ site.description | jsonify }},
"icon": "{{ "/apple-touch-icon.png" | absolute_url }}",
"favicon": "{{ "/favicon.ico" | absolute_url }}",
"expired": false,
"items": [
{% for post in site.posts limit:36 %}
{
"id": "{{ post.url | absolute_url | sha1 }}",
"title": {{ post.title | jsonify }},
"summary": {{ post.seo_description | jsonify }},
"content_text": {{ post.content | strip_html | strip_newlines | jsonify }},
"content_html": {{ post.content | strip_newlines | jsonify }},
"url": "{{ post.url | absolute_url }}",
{% if post.image.size > 1 %}"image": "{{ post.image }}",{% endif %}
{% if post.link.size > 1 %}"external_url": "{{ post.link }}",{% endif %}
{% if post.banner.size > 1 %}"banner_image": "{{ post.banner }}",{% endif %}
{% if post.tags.size > 1 %}"tags": {{ post.tags | jsonify }},{% endif %}
"date_published": "{{ post.date | date_to_xmlschema }}",
"date_modified": "{{ post.date | date_to_xmlschema }}",
"author": {
"name": "{{ post.author }}"
}
}{% if forloop.last == false %},{% endif %}
{% endfor %}
]
}

0 comments on commit 74620e8

Please sign in to comment.