{% capture apps_html %}
{% assign default = site.data.applications.cockpit %}
{% assign href = '#' %}
{% assign https = '>https://' %}
{% assign gt = '>' %}
{% for app_data in include.apps %}
{% assign slug = app_data | first %}
{% assign app = app_data | last %}
{% comment %} Title is mandatory for output {% endcomment %}
{% unless app.title %}{% continue %}{% endunless %}
{% if app.source == 'cockpit'
%}{% comment %}
Graft in Cockpit's defaults
{% endcomment %}{%
assign app_source = default.source
%}{%
assign app_issues = default.issues
%}{%
assign app_license = default.license
%}{% else %}{%
assign app_source = app.source
%}{%
assign app_issues = app.issues
%}{%
assign app_license = app.license
%}{% endif %}
{% assign link_url = app.homepage | default: app_source %}
{{ app.title }}
{{ app.description | markdownify }}
{% if app.package %}
- Package
- {{ app.package }}
{% endif %}
{% if app.homepage %}
- Homepage
{% assign link_html = href | replace: '#', app.homepage | replace: https, gt %}
- {{ link_html }}
{% endif %}
{% if app.source %}
- Source
{% assign source = href | replace: '#', app_source | replace: https, gt %}
- {{ source }}
{% endif %}
{% if app.issues %}
- Issue tracker
{% assign issues = href | replace: '#', app.issues | replace: https, gt %}
- {{ issues }}
{% endif %}
{% endfor %}
{% endcapture %}