-
Notifications
You must be signed in to change notification settings - Fork 6
/
events.json
26 lines (26 loc) · 968 Bytes
/
events.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
layout: null
---
{% assign time = site.time | date: "%Y-%m-%d" -%}
{% assign events = site.pages | where: "layout", "event" -%}
{% assign sortedEvents = site.pages | sort: 'date' -%}
[
{% for page in sortedEvents -%}
{% if page.date > time and page.hideRegistration == false -%}
{
"uid": "{{ page.date | date: "%Y%m%d" }}@cyberland.ijug.eu",
"title": "{{ page.title | smartify }}",
"summary": "{{ page.summary | default: page.title | smartify }}",
"description": "{{ page.content | strip_html | normalize_whitespace | truncatewords: 50 }}",
"location": "{{ page.location }}",
"url": "{{ site.url }}{{ page.url }}",
{% include getDateWithStartAndEndTimeFromEvent.html event=page %}
"start": "{{ dateWithStartTime | date: "%Y-%m-%dT%H:%M:00" }}",
"end": "{{ dateWithEndTime | date: "%Y-%m-%dT%H:%M:00" }}",
"timezone": "{{ site.timezone }}",
"hideRegistration": {{ page.hideRegistration }}
}
{% unless forloop.last -%}, {% endunless -%}
{% endif -%}
{% endfor -%}
]