From c6dce19581f5e2589d593ec95424914e7130ebef Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 29 Apr 2020 02:26:15 +0100 Subject: [PATCH] Add talks.json feed --- source/talks.json.twig | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 source/talks.json.twig diff --git a/source/talks.json.twig b/source/talks.json.twig new file mode 100644 index 00000000..36a0516c --- /dev/null +++ b/source/talks.json.twig @@ -0,0 +1,37 @@ +--- +permalink: talks.json +use: [talks] +--- + +{ + "talks": [ + {% for talk in data.talks %} + { + "id": "{{ loop.index }}", + "title": {{ talk.title|json_encode|raw }}, + "description": "{{ talk.description }}", + "path": "{{ talk.url|trim('/', 'right') }}", + "content": {{ talk.blocks.content|json_encode|raw }}, + "video": { + "type": "{{ talk.video.type }}", + "id": "{{ talk.video.id }}" + }, + "speakerdeck": { + "id": "{{ talk.speakerdeck.id }}", + "ratio": "{{ talk.speakerdeck.ratio }}" + }, + "events": [ + {% for event in talk.events %} + { + "date": "{{ event.date }}", + "remote": "{{ event.remote ? 'true' : 'false' }}", + "name": "{{ site.events[event.event].name }}", + "location": "{{ site.events[event.event].location }}", + "url": "{{ site.events[event.event].url }}" + }{% if not loop.last %},{% endif %} + {% endfor %} + ] + }{% if not loop.last %},{% endif %} + {% endfor %} + ] +} \ No newline at end of file