Skip to content

Commit 4c96de5

Browse files
Venefilynmvollmer
authored andcommitted
applications: Add separate maintainers file
Should consolidate the maintainers file and make it a bit easier when it comes to sorting and also not mess anything up when it comes to third-party or new entries. This also makes it easier to add new entries if we get other vendors with many packages or noteworthy ones. Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
1 parent 5317b14 commit 4c96de5

File tree

4 files changed

+36
-29
lines changed

4 files changed

+36
-29
lines changed

_data/applications.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Entries on the page show up in the order listed here, but with
2-
# maintainer: cockpit (official) first
3-
# maintainer: redhat (unofficial; non-team RH developed) second
4-
# maintainer: suse (unofficial; developed and maintained by suse)
5-
# maintainer: nil (third party) last
1+
# Entries here are displayed under their respective maintainer field.
2+
# If let unset it will be seen as third-party.
3+
# Available options are seen in maintainers.yml and for example be
4+
# - cockpit
5+
# - redhat
6+
# - suse
67

78
# The Cockpit group is special, it inherits source, issues, license for the `source: cockpit` entries
89
cockpit:

_data/maintainers.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Entries on the page show up in the order listed here
2+
# - cockpit (official) first
3+
# - redhat (unofficial; non-team RH developed) second
4+
# - suse (unofficial; developed and maintained by suse)
5+
# - nil/not set (third party) last
6+
7+
cockpit:
8+
title: Cockpit
9+
10+
redhat:
11+
title: Red Hat
12+
13+
suse:
14+
title: SUSE

_includes/apps.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,32 @@
44
{% assign https = '>https://' %}
55
{% assign gt = '>' %}
66

7-
{% for app_data in include.apps %}
8-
{% assign slug = app_data | first %}
9-
{% assign app = app_data | last %}
7+
{% for app in include.apps %}
8+
{% assign slug = app.package %}
109

1110
{% comment %} Title is mandatory for output {% endcomment %}
1211
{% unless app.title %}{% continue %}{% endunless %}
1312

1413
{% if app.source == 'cockpit'
1514
%}{% comment %}
1615
Graft in Cockpit's defaults
17-
{% endcomment %}{%
16+
{% endcomment %}{%
1817
assign app_source = default.source
19-
%}{%
18+
%}{%
2019
assign app_issues = default.issues
21-
%}{%
20+
%}{%
2221
assign app_license = default.license
2322
%}{% else %}{%
2423
assign app_source = app.source
25-
%}{%
24+
%}{%
2625
assign app_issues = app.issues
27-
%}{%
26+
%}{%
2827
assign app_license = app.license
2928
%}{% endif %}
3029

3130
{% assign link_url = app.homepage | default: app_source %}
3231

33-
<article id="slug" class="app">
32+
<article id="{{slug}}" class="app">
3433
<h4 class="app-title">{{ app.title }}</h4>
3534

3635
<header class="app-tags">
@@ -73,4 +72,4 @@ <h4 class="app-title">{{ app.title }}</h4>
7372
</article>
7473
{% endfor %}
7574
{% endcapture %}
76-
<section class="apps">{{ apps_html }}</section>
75+
<section class="apps">{{ apps_html }}</section>

applications.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,13 @@ Often, these applications are available to install with a click of a button on t
1515
Help us [expand this list](https://github.com/cockpit-project/cockpit-project.github.io/edit/main/_data/applications.yml)! Also consider [developing]({{ site.baseurl }}/external/wiki/Contributing.html) [your own application with the Starter Kit]({{ site.baseurl }}/blog/cockpit-starter-kit.html).
1616

1717
{% assign apps = site.data.applications %}
18-
{% assign grouped = apps | group_by_exp: 'item', 'item[1].maintainer' %}
1918

20-
### Official Cockpit-developed applications
21-
{% assign official = grouped[1].items %}
22-
{% include apps.html apps=official %}
23-
24-
### Red Hat developed applications
25-
{% assign unofficial = grouped[2].items %}
26-
{% include apps.html apps=unofficial %}
27-
28-
### SUSE developed applications
29-
{% assign suse_apps = grouped[3].items %}
30-
{% include apps.html apps=suse_apps %}
19+
{% for maintainer in site.data.maintainers %}
20+
### {{ maintainer[1].title }} developed applications
21+
{% assign maintainer_apps = apps | where: 'maintainer', maintainer[0] %}
22+
{% include apps.html apps=maintainer_apps %}
23+
{% endfor %}
3124

3225
### Third party
33-
{% assign thirdparty = grouped[0].items %}
34-
{% include apps.html apps=thirdparty %}
26+
{% assign thirdparty = apps | where_exp: 'item', 'item.maintainer == nil' %}
27+
{% include apps.html apps=thirdparty %}

0 commit comments

Comments
 (0)