-
Notifications
You must be signed in to change notification settings - Fork 0
/
categories.json
41 lines (37 loc) · 1.1 KB
/
categories.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
---
layout: null
---
{
{% for category in site.data.categories %}
{% assign courses = site.courses | where: "categories" , category.name %}
{% for course in courses %}
{{ for}}
{% if forloop.first == true %}
"category": "{{ category.name }}",
{% endif %}
"course": {
"title": "{{ course.title | escape_once }}",
"url" : "{{ course.url }}",
"categories" : "{{ course.categories | escape_once }}",
"age" : "{{ course.age | escape_once }}",
"level" : "{{ course.level | escape_once }}",
"school": {
{% assign schools = site.schools | where: 'title' , course.school %}
{% for school in schools %}
"title" : "{{ school.title }}",
"url" : "{{ school.url }}"
{% endfor %}
}
{% if forloop.last == true %}
}
{% else %}
},
{% endif %}
{% endfor %}
{% if forloop.last == true %}
}
{% else %}
},
{% endif %}
{% endfor %}
}