-
Notifications
You must be signed in to change notification settings - Fork 8
/
mobile.json
25 lines (25 loc) · 1.39 KB
/
mobile.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
---
---
{% assign idx = 0 %}{% assign count = 0 %}{% for pst in site.categories.mobile %}{% if pst.lang == 'en' %}{% assign count = count | plus: '1' %}{% endif %}{% endfor %}{
"mobile": {
"version" : {{ site.version }},
"data":[{% for post in site.categories.mobile %}{% if post.lang == 'en' %}{% assign idx = idx | plus: '1' %}
{
"id" : "{{post.slug}}",
"lang" : "{{post.lang}}",
"type" : "{{post.type}}",
"title" : "{{post.title}}"{% if post.status %},
"status" : {{post.status | jsonify}}{% endif %}{% if post.introduction %},
"introduction" : {{post.introduction | jsonify}}{% endif %}{% if post.warning %},
"warning" : "{{post.warning}}"{% endif %}{% if post.component %},
"component" : "{{post.component}}"{% endif %}{% if post.timers %},
"timers" : {{post.timers | jsonify}}{% endif %}{% if post.action %},
"action" : {{post.action | jsonify}}{% endif %}{% if post.success %},
"success" : {{post.success | jsonify}}{% endif %}{% if post.fail %},
"fail" : {{post.fail | jsonify}}{% endif %}{% if post.checklist %},
"checklist" : {{post.checklist | jsonify}}{% endif %}{% if post.items %},
"items" : {{post.items | jsonify }}{% endif %}{% if post.content != '' %},
"content" : {{post.content | strip_newlines | jsonify }}{% endif %}
}{% unless idx == count %},{% endunless %}{% endif %}{% endfor %}]
}
}