Fix depth problem

This commit is contained in:
Rico Sta. Cruz 2016-02-22 22:58:58 +08:00
parent 14c15dfc8a
commit 6d893d7dee
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
{% assign base = '' %}
{% 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 == 3 %}{% assign base = '../..' %}
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}