Make breadcrumb navigation a number list

This commit is contained in:
Helen Chong 2024-06-10 13:53:20 +08:00
parent 353b7ba40a
commit 2859ffe2a8
1 changed files with 2 additions and 2 deletions

View File

@ -2,14 +2,14 @@
{% if isArticle or hasBreadcrumbs %} {% if isArticle or hasBreadcrumbs %}
<nav> <nav>
<h2 class="visually-hidden">Breadcrumbs</h2> <h2 class="visually-hidden">Breadcrumbs</h2>
<ul class="breadcrumbs"> <ol class="breadcrumbs">
{% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(articleTitle or pageTitle or title) %} {% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(articleTitle or pageTitle or title) %}
{%- for entry in breadcrumbNavPages %} {%- for entry in breadcrumbNavPages %}
<li> <li>
<a href="{{ entry.url }}">{{ entry.title }}</a> <a href="{{ entry.url }}">{{ entry.title }}</a>
</li> </li>
{%- endfor %} {%- endfor %}
</ul> </ol>
</nav> </nav>
{% endif %} {% endif %}