mirror of
https://github.com/eosswedenorg/apt
synced 2026-06-16 04:34:56 +02:00
Adding assets/package_data.js
This commit is contained in:
parent
b37bb9e4ce
commit
15d69fa9ef
1 changed files with 20 additions and 0 deletions
20
assets/package_data.js
Normal file
20
assets/package_data.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
---
|
||||
{%- assign id = 1 -%}
|
||||
var package_data = [
|
||||
{%- assign repos = site.repos -%}
|
||||
{%- for repo in repos -%}
|
||||
{%- assign packages = site.packages | where: 'Repo', repo.slug -%}
|
||||
{%- for pkg in packages -%}
|
||||
{"id":{{ id }},"url":{{ pkg.url | relative_url | jsonify }},"name":{{ pkg.Name | jsonify }},"repo":{{ pkg.Repo | jsonify }},"archive":{{ pkg.Archive | jsonify }},"component":{{ pkg.Component | jsonify }},"description": {{ pkg.Description | jsonify }},
|
||||
{%- assign ver = "-" -%}
|
||||
{%- assign first_ver = pkg.Versions | limit: 1 -%}
|
||||
{%- for v in first_ver -%}
|
||||
{%- assign ver = v[0] -%}
|
||||
{%- endfor -%}
|
||||
"version":{{ ver | jsonify }}
|
||||
{%- assign id = id | plus: 1 -%}
|
||||
},
|
||||
{%- endfor -%}
|
||||
{%- endfor -%}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue