mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-01-22 17:30:00 +00:00
feat(11ty): only render flag in ToC if type is defined
some defintions might be flagged as avoid without being further specified, in this case no flag should be rendered in the table of content
This commit is contained in:
parent
f8469baf5f
commit
fad87004ce
@ -4,7 +4,10 @@
|
||||
{% for definition in collections.definitions %}
|
||||
{% set renderedName %}
|
||||
{{ definition.data.title}}
|
||||
{%- if definition.data.flag and (definition.data.flag.level == 'avoid') -%}
|
||||
{%- if
|
||||
definition.data.flag and
|
||||
definition.data.flag.type and
|
||||
(definition.data.flag.level == 'avoid') -%}
|
||||
<span class="flag__red">{{ definition.data.flag.type }}</span>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user