{%- capture pageUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if pageUrl contains page.fileSlug and page.fileSlug %}
  <span class="active" aria-current="page">
    {% if icon %}
      {% tablericon icon link %}
    {% else %}
      {{ link }}
    {% endif %}
  </span>
{% else %}
  {% if icon %}
    <a class="{{ icon | downcase }}" href="/{{ link | downcase }}">
      {% tablericon icon link %}
    </a>
  {% else %}
    <a href="/{{ link | downcase }}">
      {{ link }}
    </a>
  {% endif %}
{% endif %}