setto.basspistol.com/_includes/relBase.html
2020-07-24 14:34:09 +02:00

12 lines
380 B
HTML

{% assign relBase = '' %}
{% assign tempDepth = page.url | append: 'hackish-solution' | split: '/' | size | minus: 2 %}
{% for i in (1..tempDepth) %}
{% if forloop.last %}
{% assign relBase = relBase | append: ".." %}
{% else %}
{% assign relBase = relBase | append: "../" %}
{% endif %}
{% endfor %}
{% if relBase == '' %}
{% assign relBase = '.' %}
{% endif %}