diff options
author | ronv <ronalds.vilcins@gmail.com> | 2020-01-30 20:19:33 +0200 |
---|---|---|
committer | ronv <ronalds.vilcins@gmail.com> | 2020-01-30 20:19:33 +0200 |
commit | a1a0a4ad553f59906930d44bf56b089421d2c7a5 (patch) | |
tree | ca8b44675434a07394c63a4b0bb22390ed261589 /feed.json | |
parent | bc7896a33321ad0c6e22ad60f20e498f55900c12 (diff) | |
download | wiki-a1a0a4ad553f59906930d44bf56b089421d2c7a5.tar.gz |
initial commit
Diffstat (limited to 'feed.json')
-rwxr-xr-x | feed.json | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/feed.json b/feed.json new file mode 100755 index 0000000..ebc746f --- /dev/null +++ b/feed.json @@ -0,0 +1,60 @@ +--- +layout: null +--- +{ + "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, + {% if site.author %} + "author": {% if site.author.name %} { + "name": "{{ site.author.name }}", + "url": {% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %}, + "avatar": {% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %} + },{% else %}"{{ site.author }}",{% endif %} + {% endif %} +"items": [ + {% for post in site.posts limit:36 %} + { + "id": "{{ post.url | absolute_url | sha1 }}", + "title": {{ post.title | jsonify }}, + "summary": {{ post.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 | jsonify }},{% 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 %} + {% if post.enclosure.size > 1 %}"attachments": [ { + "url": "{{ post.enclosure }}", + "mime_type": "{{ post.enclosure_type }}", + "size_in_bytes": "{{ post.enclosure_length }}" + },{% endif %} + "date_published": "{{ post.date | date_to_xmlschema }}", + "date_modified": "{{ post.date | date_to_xmlschema }}", + {% if post.author %} + "author": {% if post.author.name %} { + "name": "{{ post.author.name }}", + "url": {% if post.author.url %}"{{ post.author.url }}"{% else %}null{% endif %}, + "avatar": {% if post.author.avatar %}"{{ post.author.avatar }}"{% else %}null{% endif %} + } + {% else %}"{{ post.author }}"{% endif %} + {% else %} + "author": {% if site.author.name %} { + "name": "{{ site.author.name }}", + "url": {% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %}, + "avatar": {% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %} + } + {% else %} + "{{ site.author }}" + {% endif %} + {% endif %} + }{% if forloop.last == false %},{% endif %} + {% endfor %} + ] +}
\ No newline at end of file |