sakrecoer-mother-web/_includes/relBase.html
2020-01-13 17:44:10 +01:00

13 lines
381 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 %}