{%- set paths = page.path.split('/') %}
{%- set count = paths.length %}
{%- if count > 2 %}
{%- set current = 0 %}
{%- set link = '' %}
{%- for path in paths %}
{%- set current = current + 1 %}
{%- if path != 'index.html' %}
{%- if current == count - 1 and paths[count - 1] == 'index.html' %}
{{ path | upper }}
{% else %}
{%- if link == '' %}
{%- set link = '/' + path %}
{% else %}
{%- set link = link + '/' + path %}
{%- endif %}
{%- if path.includes('.html') %}