mirror of
https://github.com/eosswedenorg/apt
synced 2026-06-16 04:34:56 +02:00
Update search module to handle new package format.
This commit is contained in:
parent
bb91640bab
commit
088f1106a5
2 changed files with 5 additions and 5 deletions
|
|
@ -20,7 +20,7 @@
|
|||
</span>
|
||||
|
||||
<span class="search-results-archive">
|
||||
[<span x-text="item.archive"></span>:<span x-text="item.component"></span>]
|
||||
[<span x-text="item.repo"></span>:<span x-text="item.component"></span>]
|
||||
</span>
|
||||
</div>
|
||||
<span class="search-results-description" x-text="item.description"></span>
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
var package_data = [
|
||||
{%- assign repos = site.repos -%}
|
||||
{%- for repo in repos -%}
|
||||
{%- assign packages = site.packages | where: 'Repo', repo.slug -%}
|
||||
{%- 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 }},
|
||||
{"id":{{ id }},"url":{{ pkg.url | relative_url | jsonify }},"name":{{ pkg.name | jsonify }},"repo":{{ pkg.repo | jsonify }},"distribution":{{ pkg.distribution | jsonify }},"component":{{ pkg.component | jsonify }},"description": {{ pkg.description | jsonify }},
|
||||
{%- assign ver = "-" -%}
|
||||
{%- assign first_ver = pkg.Versions | limit: 1 -%}
|
||||
{%- assign first_ver = pkg.versions | limit: 1 -%}
|
||||
{%- for v in first_ver -%}
|
||||
{%- assign ver = v[0] -%}
|
||||
{%- assign ver = v.version -%}
|
||||
{%- endfor -%}
|
||||
"version":{{ ver | jsonify }}
|
||||
{%- assign id = id | plus: 1 -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue