-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathevents.json
More file actions
29 lines (29 loc) · 1.39 KB
/
events.json
File metadata and controls
29 lines (29 loc) · 1.39 KB
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
27
28
29
---
layout: null
---
{%- comment %} Erzeugungsdatum - 7 Tage, um auch noch das letzte Event zu sehen {% endcomment -%}
{%- assign fromInSeconds = site.time | date: "%s" | minus : 604800 -%}
[
{%- for post in site.posts reversed -%}
{%- assign postDateInSeconds = post.date | date: "%s" | minus : 0 -%}
{%- if postDateInSeconds > fromInSeconds %}
{
"uid": "{{ post.date | date: "%Y%m%d" }}@jug-da.de",
"lastModified": "{% assign offset = post.last_modified_at | date: "%:::z" | times: 3600 %}{{ post.last_modified_at | date: "%s" | minus: offset | date: "%Y%m%dT%H%M00Z" }}",
"summary": "{{ post.title | smartify }}{% if post.speaker %} ({{ post.speaker | map: "name" | join: ", " }}){% endif %}",
"title": "{{ post.title | smartify }}",
"description": "{{ post.content | strip_html | normalize_whitespace | truncatewords: 100 }}",
{% if post.speaker %}"speaker": "{{ post.speaker | map: "name" | join: ", " }}",{% endif %}
"location": "{{ post.location }}",
"url": "{{ site.url }}{{ post.url }}",
{%- include getDateWithStartAndEndTimeFromEvent.html event=post %}
"start": "{{ dateWithStartTime | date: "%Y-%m-%dT%H:%M:00" }}",
"end": "{{ dateWithEndTime | date: "%Y-%m-%dT%H:%M:00" }}",
"timezone": "{{ site.timezone }}",
"hideRegistration": {{ post.hideRegistration }},
"canceled": {{ post.canceled }},
"externalEvent": {{ post.externalEvent }}
}{%- unless forloop.last %},{%- endunless %}
{%- endif -%}
{%- endfor %}
]