fix relative paths

This commit is contained in:
mattx 2020-08-29 22:00:20 +00:00
parent 920762f564
commit 87050e1389
2 changed files with 12 additions and 13 deletions

View File

@ -1,12 +0,0 @@
{% 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
%}

View File

@ -6,7 +6,18 @@
{% comment %}
congratulations! you've found it.
{% endcomment %}
{% include base.html %}
{% assign base = ''
%}{% assign depth = page.url | split: '/' | size
%}{% if depth <= 1
%}{% assign base = '.'
%}{% elsif depth == 2
%}{% assign base = '..'
%}{% elsif depth == 3
%}{% assign base = '../..'
%}{% elsif depth == 4
%}{% assign base = '../../..'
%}{% endif
%}
{% include meta.html %}
{% include css.html %}
<title>{{ page.title }}</title>