Skip to content

Commit e58c23c

Browse files
committed
Fix for tools without license or templates values
1 parent 8bfe438 commit e58c23c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/site/_includes/components/cards.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656
<dt class="col-span-2 font-bold">Language:</dt>
5757
<dd class="col-span-3">{{ item.data.language }}</dd>
5858
{%- endif %}
59-
{%- if item.data.templates %}
59+
{%- if item.data.templates and item.data.templates.length > 0 %}
6060
<dt class="col-span-2 font-bold">Templates:</dt>
6161
<dd class="col-span-3">{{ item.data.templates | join(", ") }}</dd>
6262
{%- endif %}
63-
{%- if item.data.license %}
63+
{%- if item.data.license and item.data.license.length > 0 %}
6464
<dt class="col-span-2 font-bold">License:</dt>
65-
<dd class="col-span-3">{{ item.data.license }}</dd>
65+
<dd class="col-span-3">{{ item.data.license | join(", ") }}</dd>
6666
{%- endif %}
6767
{%- if item.data.typeofcms %}
6868
<dt class="col-span-2 font-bold">Type:</dt>

src/site/_includes/layouts/tool.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ layout: layouts/base.njk
6262
<dt class="inline-block font-bold">Language:</dt>
6363
<dd class="inline-block mr-6">{{ language }}</dd>
6464
{%- endif %}
65-
{%- if license %}
65+
{%- if license and license.length > 0 %}
6666
<dt class="inline-block font-bold">License:</dt>
67-
<dd class="inline-block mr-6">{{ license }}</dd>
67+
<dd class="inline-block mr-6">{{ license | join(", ") }}</dd>
6868
{%- endif %}
69-
{%- if templates %}
69+
{%- if templates and templates.length > 0 %}
7070
<dt class="inline-block font-bold">Templates:</dt>
7171
<dd class="inline mr-6">{{ templates | join(", ") }}</dd>
7272
{%- endif %}

0 commit comments

Comments
 (0)