{%- capture categoryUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if categoryUrl | isLinkActive: page.url %}
  <span class="active {{ class }}" aria-current="page">
    {% if icon %}
      {% tablericon icon link %}
    {% else %}
      {{ link }}
    {% endif %}
  </span>
{% else %}
  {% if icon %}
    <a class="{{ icon | downcase }} {{ class }}" href="/{{ link | downcase }}">
      {% tablericon icon link %}
    </a>
  {% else %}
    <a href="/{{ link | downcase }}">
      {{ link }}
    </a>
  {% endif %}
{% endif %}