chore: improve nav active state checking

This commit is contained in:
Cory Dransfeldt 2024-03-18 18:44:35 -07:00
parent 3cff5d47e6
commit f39f5ee2ff
No known key found for this signature in database
3 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{%- capture pageUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if pageUrl contains page.fileSlug and page.fileSlug %}
{%- capture categoryUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if categoryUrl | isLinkActive: page.url %}
<span class="active {{ class }}" aria-current="page">
{% if icon %}
{% tablericon icon link %}