generated from code4lib/2021.code4lib.org
-
Notifications
You must be signed in to change notification settings - Fork 3
/
search_data.json
60 lines (39 loc) · 1.21 KB
/
search_data.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
layout: null
---
{% if site.data.conf.search %}
{
{% for post in site.posts %}
{% capture year %}{{post.date | date: "%Y"}}{% endcapture %}
{% assign speakers = "" %}
{% assign counter = 0 %}
{% assign inc = 0 %}
{% for speakerId in post.speakers %}
{% if speakerId != 0 %}
{% assign counter = counter | plus: 1 %}
{% endif %}
{% endfor %}
{% for speakerId in post.speakers %}
{% if speakerId != 0 %}
{% assign inc = inc | plus: 1 %}
{% if inc == counter %}
{% capture spacing %}{% endcapture %}
{% else %}
{% capture spacing %}, {% endcapture %}
{% endif %}
{% assign speaker = site.data.speakers[speakerId] %}
{% capture speakers %}{{speakers}}{{speaker.Name}}{{spacing}}{% endcapture %}
{% endif %}
{% endfor %}
{% if year == "2020" %}
{% unless forloop.first %},{% endunless %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"url": " {{ post.url | xml_escape }}",
"speakers": "{{ speakers | xml_escape }}",
"type": "{{ post.type | xml_escape }}"
}
{% endif %}
{% endfor %}
}
{% endif %}