forked from blakadder/templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
templates.json
24 lines (23 loc) · 1.26 KB
/
templates.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
---
title: JSON Templates
layout: null
---
{
"created": "{{ site.time }}",
"templates":
[
{% for template in site.templates %}
{
{% if template.title != nil %}"name": {{ template.title | jsonify }},{% endif %}
{% if template.model != nil %}"model": "{{ template.model }}",{% endif %}
"link": "{{ site.baseurl }}{{ template.url }}",
{% if template.type != nil %}"type": "{{ template.type }}",{% endif %}
{% if template.category != nil %}"category": "{{ template.category }}",{% endif %}
{% if template.standard != nil %}"standard": [{% assign standard_list = template.standard %}{% for item_standard in standard_list %}"{{ item_standard | upcase }}"{% unless forloop.last %},{% endunless %}{% endfor %}],{% endif %}
{% if template.template32 != nil %}"template": {{ template.template32 }}{% elsif template.template9 != nil %}"template": {{ template.template9 }}{% else %}"template": {{ template.template }}{% endif %},
{% if template.image != nil %}"image": {{ template.image | jsonify }},{% endif %}
"product": {% if template.link == nil %}null{% else %}{{ template.link | jsonify }}{% endif %}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}