diff --git a/_includes/base.html b/_includes/base.html index ee8e810..0714035 100644 --- a/_includes/base.html +++ b/_includes/base.html @@ -1,7 +1,3 @@ - -{% assign base = '' %} -{% assign depth = page.url | split: '/' | size | minus: 1 %} -{% if depth <= 1 %}{% assign base = '.' %} -{% elsif depth == 2 %}{% assign base = '..' %} -{% elsif depth == 3 %}{% assign base = '../..' %} -{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %} +{% capture lvl %}{{ page.url | append:'index.html' | split:'/' | size }}{% endcapture %} +{% capture base %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + diff --git a/_includes/head.html b/_includes/head.html index 920d16b..b4998f2 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -7,7 +7,7 @@