forked from kimai/www.kimai.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugins.json
39 lines (39 loc) · 1.84 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
---
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 -%}
{%- for version in settings.bundle.versions -%}
{%- assign startsVersion = version[1] | slice: 0, 2 -%}
{%- if startsVersion == '2.' -%}
{%- assign minimumVersion = version[1] -%}
{%- endif -%}
{%- endfor -%}
{%- assign developer = site.data.developer[settings.developer] -%}
"name": "{{ translation.title }}",
"url": "{{ product.url | absolute_url }}",
{%- if settings.lemonsqueezy != nil %}
"buy": "{{ settings.lemonsqueezy }}",
{%- elsif settings.gumroad != nil %}
"buy": "{{ settings.gumroad }}",{%- 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 %}
]