Fix depth problem
This commit is contained in:
parent
14c15dfc8a
commit
6d893d7dee
|
@ -4,7 +4,7 @@
|
||||||
{% 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}}'>
|
<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 = '../..' %}
|
||||||
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
|
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue