sakrecoer-mother-web/_includes/relBase.html
2020-07-19 13:39:02 +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 %}