-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbars_and_food.json
29 lines (29 loc) · 1.24 KB
/
bars_and_food.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
---
# Remember to set production_url in your _config.yml file!
title : JSON
---
{
"bars": [{% for bar in site.categories.bars %}
{
"name": {{ bar.name | jsonify }},
"lat": {{ bar.lat }},
"lon": {{ bar.lon }}{% if bar.link %},"link": {{ bar.link | jsonify }}{% endif %}
{% if bar.special %},"special": {{ bar.special | jsonify }}{% endif %}
{% if bar.content %},"comment": {{ bar.content | markdownify | remove: '<p>' | remove: '</p>' | strip | jsonify }}{% endif %}
{% if bar.tel %},"tel": {{ bar.tel | jsonify }}{% endif %}
}{% if forloop.last %}{% else %},{% endif %}{% endfor %}
],
"food": [{% assign sorted_food = site.categories.food | sort: 'name' %}
[{% for place in sorted_food %}
{
"name": {{ place.name | jsonify }},
"lat": {{ place.lat }},
"lon": {{ place.lon }}{% if place.link %},"link": {{ place.link | jsonify }}{% endif %}
{% if place.special %},"special": {{ place.special | jsonify }}{% endif %}
{% if place.content %},"comment": {{ place.content | markdownify | remove: '<p>' | remove: '</p>' | strip | jsonify }}{% endif %}
{% if place.tel %},"tel": {{ place.tel | jsonify }}{% endif %}
{% assign number=number | plus:1 %}
}{% if forloop.last %}{% else %},{% endif %}{% endfor %}
]
]
}