chore: improve nav active state checking
This commit is contained in:
parent
3cff5d47e6
commit
f39f5ee2ff
3 changed files with 9 additions and 3 deletions
|
@ -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 %}
|
||||
|
|
Reference in a new issue