Skip to content

Commit

Permalink
Update JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwrobel committed Dec 22, 2022
1 parent 6b65099 commit 8208536
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions _layouts/v1_product.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
{%- capture simpleIconsUrl %}https://simpleicons.org/icons/{{ page.iconSlug }}.svg{% endcapture -%}
{%- capture endOfLifeUrl %}{{ site.url }}/{{ page.id }}{% endcapture -%}
{
"title": {{ page.title | jsonify }},
"name": {{ page.id | jsonify }},
"label": {{ page.title | jsonify }},
"category": {{ page.category | jsonify }},
"iconSlug": {{ page.iconSlug | jsonify }},
"permalink": "{{ site.url }}/{{ page.id }}",
"links": {
"icon": {{ simpleIconsUrl | jsonify }},
"html": {{ endOfLifeUrl | jsonify }},
"releasePolicy": {{ page.releasePolicyLink | jsonify }}
},
"versionCommand": {{ page.versionCommand | jsonify }},
"releasePolicyLink": {{ page.releasePolicyLink | jsonify }},
"lastModified": {{ page.last_modified_at | date_to_xmlschema | jsonify }},
"auto": {% if page.auto %}true{% else %}false{% endif %},
"releases": [
"cycles": [
{% for r in page.releases -%}
{%- capture link %}{% include release_link.url release=r template=page.changelogTemplate %}{% endcapture -%}
{%- capture label %}{% include release_label.txt release=r template=page.releaseLabel %}{% endcapture -%}
{%- assign link = link | strip | strip_newlines -%}
{%- assign label = label | strip | strip_newlines -%}
{
"cycle": {{ r.releaseCycle | jsonify }},
"label": {{ label | jsonify }},
"name": {{ r.releaseCycle | jsonify }},
"codename": {{ r.codename | jsonify }},
"releaseDate": {{ r.releaseDate | jsonify }},
"label": {{ label | jsonify }},
"date": {{ r.releaseDate | jsonify }},
"support": {{ r.support | jsonify }},
"eol": {{ r.eol | jsonify }},
"lts": {{ r.lts | nil_to_false | jsonify }},
"eol": {{ r.eol | jsonify }},
"discontinued": {{ r.diconstinued | nil_to_false | jsonify }},
"latest": {{ r.latest | jsonify }},
"latestReleaseDate": {{ r.latestReleaseDate | jsonify }},
"link": {% if link != "" %}{{ link | jsonify }}{% else %}null{% endif %}
"latest": {
"version": {{ r.latest | jsonify }},
"date": {{ r.latestReleaseDate | jsonify }},
"link": {% if link != "" %}{{ link | jsonify }}{% else %}null{% endif %}
}
}{% unless forloop.last %},{% endunless -%}
{%- endfor %}
]
Expand Down

0 comments on commit 8208536

Please sign in to comment.