making all path relative

This commit is contained in:
Set Hallstrom 2019-12-16 12:12:57 +01:00
parent 1d1c40fd3b
commit f39725b142
24 changed files with 85 additions and 61 deletions

12
_includes/relBase.html Normal file
View file

@ -0,0 +1,12 @@
{% 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 %}