From 41dfdbe20995d348d11960034e4c3044d19cb6ce Mon Sep 17 00:00:00 2001 From: Yehonal Date: Sun, 7 May 2017 23:43:02 +0200 Subject: trying to fix edit when index is not in root --- _layouts/default.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '_layouts') diff --git a/_layouts/default.html b/_layouts/default.html index c68fad6..f7c5cf1 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,7 +1,8 @@ - {% capture url %}{% if page.url == "/" %}/index.html{% else %}{{ page.url | default: 'index.html' }}{% endif %}{% endcapture %} + {% capture lchar %}{page.url | slice: -1, 1}{% endcapture %} + {% capture url %}{% if lchar == "/" %}/index.html{% else %}{{ page.url | default: 'index.html' }}{% endif %}{% endcapture %} {{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }} -- cgit