{% capture lvl %}{{ page.url | append:'index.html' | split:'/' | size }}{% endcapture %}
{% capture base %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
<!-- {{ base }} -->