1
0
Fork 0
mirror of https://github.com/eosswedenorg/apt synced 2026-06-16 04:34:56 +02:00

_layouts/repo.html: modify to support multiple distributions

This commit is contained in:
Henrik Hautakoski 2020-02-28 10:40:39 +01:00
parent 1e77c6d962
commit 2ddec94e98

View file

@ -2,45 +2,16 @@
layout: default
---
{% assign id = page.slug %}
{% assign dists = site.packages | where: 'Repo', id | group_by: 'Archive' %}
{% assign domain = page.domain | default: site.apt.domain %}
{% assign repo = page.repo %}
{% assign list = site.packages | where: 'Repo', repo %}
<h2>{{ page.title }} repository</h2>
<p>
NOTE: If this is your first time here, you need to do some configurations before you can use this repository.
Please read the <a target="_blank" href="{{ "/#setup" | absolute_url }}">instructions</a>.
</p>
<h2>{{ page.title }} Repository</h2>
<p>{{ page.description }}</p>
{% for component in site.apt.components %}
<h3>{{ component }}</h3>
{% assign packages = list | where: 'Component', component %}
{% if packages.size > 0 %}
{% include apt-add.html domain=domain repo=repo components=component %}
<table class="d-lg-table">
<tr>
<th style="width: 20%">Name</th>
<th>Description</th>
<th>Latest Version</th>
</tr>
{% for package in packages %}
<tr>
<td><a href="{{ package.url | relative_url }}" >{{ package.Name }}</a></td>
<td>{{ package.Description }}</td>
<td>{{ package.Versions.first[0] }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p class="text-gray-light">No packages</p>
{% endif %}
<p>Choose your ubuntu version below</p>
<ul>
{% for dist in dists %}
{% assign info = site.data.dists[dist.name] %}
<li><a href="{{ page.url | replative_url }}/{{ dist.name }}">{{ dist.name }} {{ info.version }}</a> - {{ dist.items.size }} Packages</li>
{% endfor %}
</ul>