Skip to content

Commit

Permalink
docs(11ty): prevent duplicated IDs in API page
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed Mar 3, 2022
1 parent 3ae5284 commit 886e1ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_includes/components/utils.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% for t in theme %}
{% if t.attributes.subcategory == s.title %}
<article>
<h3 id="{{ t.attributes.name }}">{{ t.attributes.title }}</h3>
<h3 id="{{ s.title }}-{{ t.attributes.name }}">{{ t.attributes.title }}</h3>
{{ t.body | safe }}
</article>
{% endif %}
Expand Down Expand Up @@ -36,7 +36,7 @@
{% for t in theme %}
{% if t.attributes.title != '' and t.attributes.subcategory == s.title %}
<li>
<a href="#{{ t.attributes.name }}">{{ t.attributes.title }}</a>
<a href="#{{ s.title }}-{{ t.attributes.name }}">{{ t.attributes.title }}</a>
</li>
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 886e1ed

Please sign in to comment.