realtive paths
This commit is contained in:
parent
cf9f74516f
commit
6dd63fd195
11 changed files with 77 additions and 54 deletions
12
_includes/relBase.html
Normal file
12
_includes/relBase.html
Normal 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue