From 1d000946313c5758b2935ed8cc9a64858172ff74 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Tue, 27 Feb 2018 12:51:53 +0100 Subject: Use relative urls --- _includes/head.html | 15 +++++---------- _includes/header.html | 13 +++++++------ _includes/relBase.html | 8 ++++++++ 3 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 _includes/relBase.html (limited to '_includes') diff --git a/_includes/head.html b/_includes/head.html index 0dc3028..9bedb01 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,21 +1,16 @@ +{% include relBase.html %} Noah Loomans - + - - - - + + + {% if page.info %} diff --git a/_includes/header.html b/_includes/header.html index 3b0c26e..eb46a8e 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,8 @@ +{% include relBase.html %}
@@ -10,10 +11,10 @@ diff --git a/_includes/relBase.html b/_includes/relBase.html new file mode 100644 index 0000000..b2d4bc4 --- /dev/null +++ b/_includes/relBase.html @@ -0,0 +1,8 @@ +{% assign relBase = '' %} +{% assign tempDepth = page.url | append: 'hackish-solution' | split: '/' | size | minus: 2 %} +{% for i in (1..tempDepth) %} + {% assign relBase = relBase | append: "../" %} +{% endfor %} +{% if relBase == '' %} + {% assign relBase = './' %} +{% endif %} -- cgit v1.1