Debug page depth

This commit is contained in:
Rico Sta. Cruz 2016-02-22 22:56:55 +08:00
parent 475b828ebe
commit 54e177cd66
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@
{%comment%}<!-- set the base -->{%endcomment%} {%comment%}<!-- set the base -->{%endcomment%}
{% assign base = '' %} {% assign base = '' %}
{% assign depth = page.url | split: '/' | size | minus: 1 %} {% assign depth = page.url | split: '/' | size | minus: 1 %}
<meta property='page:depth' content='{{depth}}'>
{% if depth == 1 %}{% assign base = '.' %} {% if depth == 1 %}{% assign base = '.' %}
{% elsif depth == 2 %}{% assign base = '..' %} {% elsif depth == 2 %}{% assign base = '..' %}
{% elsif depth == 3 %}{% assign base = '../..' %} {% elsif depth == 3 %}{% assign base = '../..' %}