generated from shgysk8zer0/jekyll-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathevents.json.config
39 lines (39 loc) · 1.83 KB
/
events.json.config
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
30
31
32
33
34
35
36
37
38
39
---
layout: null
permalink: /events.json
index: false
---
{% assign events = site.data.events | sort: 'startDate' %}
[{% for event in events %}
{
"@context": "https://schema.org",
"@type": "{{ event['@type'] | default: 'Event' }}",
"@identifier": "{{ event.uuid }}",
"name": {{ event.name | default: event.title | jsonify }},
"url": "{{ '/events/' | absolute_url }}#{{ event.uuid }}",
"image": "{{ event.image | default: '/img/markers/activity.svg' | absolute_url }}",
"eventStatus": "{{ event.eventStatus | default: 'EventScheduled' }}",
"eventAttendanceMode": {{ event.eventAttendanceMode | jsonify }},
"description": {{ event.description | jsonify }},
"startDate": "{{ event.startDate | date_to_xmlschema }}",
"endDate": "{{ event.endDate | date_to_xmlschema }}",
"location": {
"@type": "{{ event.location['@type'] | default: 'Place' }}",
"name": "{{ event.location.name | default: 'Kernville, CA' }}",
{% if event.location.address %}"address": {
"@type": "{{ event.location.address['@type'] | default: 'PostalAddress' }}",
"streetAddress": {{ event.location.address.streetAddress | jsonify }},
"addressLocality": "{{ event.location.address.addressLocality }}",
"addressRegion": "{{ event.location.address.addressRegion | default: 'CA' }}",
"postalCode": {{ event.location.address.postalCode | default: 93238 | jsonify }},
"addressCountry": "{{ event.location.addressCountry | default: 'US' }}"
}{% endif %},
"geo": {
"@type": "{{ event.location.geo['@type'] | default: 'GeoCoordinates' }}",
"longitude": {{ event.location.geo.longitude | jsonify }},
"latitude": {{ event.location.geo.latitude | jsonify }}
}
},
"offers": {{ event.offers | jsonify }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}]