{% capture page_url_without_index_html %}{{ page.url | remove: "/index.html" | remove: "/404.html" }}{% endcapture %} {% assign splitted_url_parts = page_url_without_index_html | split: '/' %} {% capture forLoopMaxInt %}{{ splitted_url_parts.size | minus:1 }}{% endcapture %} {% for i in (1..forLoopMaxInt) %} {% capture url %}{{ url }}{{ splitted_url_parts[i] }}/{% endcapture %} {% capture path %}{{ path }}\{{ splitted_url_parts[i] | upcase }}{% endcapture %} {% if splitted_url_parts[i] == "blog" %} {% break %} {% endif %} {% endfor %}

Directory of C:\PCJS.ORG{{ path }}