Created
September 11, 2017 22:56
-
-
Save allejo/ecb37c143cedf9f569612d68984534ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign base = '' %} | |
{% assign depth = page.url | split: '/' | size | minus: 1 %} | |
{% if depth <= 1 %} | |
{% assign base = '.' %} | |
{% else %} | |
{% for d in (1..depth) %} | |
{% assign base = base | append: '..' %} | |
{% unless forloop.last %} | |
{% assign base = base | append: '/' %} | |
{% endunless %} | |
{% endfor %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment