-
Notifications
You must be signed in to change notification settings - Fork 88
/
plugins.json
40 lines (40 loc) · 1.9 KB
/
plugins.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
---
layout: none
sitemap: false
permalink: /plugins.json
---
{% assign products = site.store | where: "lang", 'en' | sort: 'title' %}
[
{%- for product in products -%}
{
{%- assign translation = site.data['en'].store.items[product.slug] -%}
{%- assign settings = site.data.store[product.slug] -%}
{%- assign minimumVersion = nil -%}
{%- if site.data.store.releases[settings.bundle.name] != nil -%}
{%- for version in site.data.store.releases[settings.bundle.name].versions -%}
{%- assign startsVersion = version[1] | slice: 0, 2 -%}
{%- if startsVersion == '2.' -%}
{%- assign minimumVersion = version[1] -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- assign developer = site.data.developer[settings.developer] -%}
"name": "{{ translation.title }}",
"url": "{{ product.url | absolute_url }}",
{%- if settings.shop != nil %}
"buy": "{{ settings.shop }}",
{%- endif %}
"developer": {
"name": "{{ developer.name }}",
"homepage": {% if developer.homepage %}"{{ developer.homepage }}"{% else %}null{% endif %}
},
"minimum_version": {% if minimumVersion == nil %}null{% else %}"{{ minimumVersion }}"{% endif %},
"bundle": {% if settings.bundle %}"{{ settings.bundle.name }}"{% else %}null{% endif %},
"featured": {% if product.type == 'featured' %}true{% else %}false{% endif %},
"icon": "{{ settings.icon | default: "fas fa-question" }}",
"description": "{{ translation.intro }}",
"new": {% if settings.new %}true{% else %}false{% endif %},
"price": {% if settings.subscription != nil %}"{{ settings.subscription }}"{% elsif settings.price == nil %}null{% else %}"{{ settings.price }}"{% endif %}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]