-
Notifications
You must be signed in to change notification settings - Fork 2
/
collection.json
29 lines (29 loc) · 1.44 KB
/
collection.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
---
title: Wapuugotchi collection
permalink: /collection/
meta: [name,author,description,published,key]
labels: [balls,caps,coats,fur,shoes,items]
---
{
"collections": [
{% for collection in site.collections %}{% if page.labels contains collection.label %}{
"items": {
{% assign filtered_items = collection.docs | where: "deactivated", 0 %}{% for item in filtered_items %}"{{ item.slug }}": {
"meta": { {% for var in page.meta %}
"{{ var }}": "{{ item[var] }}",{% endfor %}
"deactivated": {% if item.deactivated != nil %}{{ item.deactivated }}{% else %}0{% endif %},
"priority": {% if item.priority != nil %}{{ item.priority }}{% else %}0{% endif %},
"price": {% if item.price != nil %}{{ item.price }}{% else %}0{% endif %}
},
"image": "{{ item.url | absolute_url | replace: "meta.html", "image.svg" }}",
"preview": "{{ item.url | absolute_url | replace: "meta.html", "preview.svg" }}"
}{% unless forloop.last %},
{% endunless %}{% endfor %}
},
"image": "{{ site.url }}/assets/icons/{{ collection.label }}.svg",
"slug": "{{ collection.label }}",
"caption": "{{ collection.label | capitalize }}"
}{% unless forloop.last %},
{% endunless %}{% endif %}{% endfor %}
]
}