--- layout: base docs_tab: true analytics_id: UA-64283057-1 --- {% include header.html %} {% comment %} set some constants {% endcomment %} {% assign ALL_PAGES = site.data.all-pages %} {% assign TOCFILE = site.data.toc[page.tocfile] %} {% capture VERSION_ROOT %}/docs/{{ page.language }}/{{ page.version }}/{% endcapture %} {% capture LANGUAGE_ROOT %}/docs/{{ page.language }}/{% endcapture %} {% assign MY_ENTRY = page.url | replace: VERSION_ROOT,"" %} {% assign my_entry_parts = MY_ENTRY | split: "/" %} {% comment %} PATH_TO_ROOT: path from here to version root, replacing all parts except the last one with '../' NOTE: the capture is a single line because extraneous whitespace would screw up the URI it produces {% endcomment %} {% capture PATH_TO_ROOT %}{% for item in my_entry_parts %}{% if forloop.rindex > 1 %}../{% endif %}{% endfor %}{% endcapture %}