Render changelog navigation via the Navigation plugin

This commit is contained in:
Helen Chong 2024-04-18 22:13:42 +08:00
parent f4ae672547
commit 837e5e947a
1 changed files with 3 additions and 8 deletions

View File

@ -11,15 +11,10 @@ layout: main/content
<a {% if currentUrl === "/changelogs/" %}aria-current="page"{% endif %} href="/changelogs">Latest</a> <a {% if currentUrl === "/changelogs/" %}aria-current="page"{% endif %} href="/changelogs">Latest</a>
</li> </li>
| |
{% for page in collections["changelog pages"] | reverse %} {% set navPages = collections.all | eleventyNavigation("Changelogs") | reverse %}
{%- for entry in navPages %}
<li> <li>
<a <a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
{% if currentUrl === page.url %}
aria-current="page"
{% endif %}
href="{{ page.url }}">
{{ page.data.changelogNav }}
</a>
</li> </li>
{% if not loop.last %}|{% endif %} {% if not loop.last %}|{% endif %}
{%- endfor %} {%- endfor %}