From 3b1268aa2c520b757df194e5fb729b4c5141cd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info> Date: Wed, 25 Oct 2017 23:49:28 +0200 Subject: [PATCH] Small fixes --- sitegin/nunjucks.js | 1 + theme/templates/article.html.nunj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sitegin/nunjucks.js b/sitegin/nunjucks.js index 3e4cde8..cff74e7 100644 --- a/sitegin/nunjucks.js +++ b/sitegin/nunjucks.js @@ -48,6 +48,7 @@ env.addFilter('relURL', function(filename, dir){ if(filename.substr(0,1) == '/' || filename.match('://')) return filename; if(dir.substr(0,1) !== '/') dir = '/' + dir; if(filename.match(/\/$/)) return dir+filename; + if(dir.match(/\/$/)) return dir+filename; return dir+'/'+filename; }) diff --git a/theme/templates/article.html.nunj b/theme/templates/article.html.nunj index 8c85d55..50967b8 100644 --- a/theme/templates/article.html.nunj +++ b/theme/templates/article.html.nunj @@ -42,7 +42,7 @@ <div class="metadata"> <h2 id="title">{{ metadata.title }}</h2> {% if not metadata.nodate %} - <a class="author" style="color: #a2a2a2; display: block" class="black-text" target="_blank" href="https://git.ok1kvk.cz/ok1kvk.cz/content/tree/master/articles/{{file | replace("clanek/","")}}.md"> + <a class="author" style="color: #a2a2a2; display: block" class="black-text" target="_blank" href="https://git.ok1kvk.cz/ok1kvk.cz/content/tree/master/articles/{{file | replace("clanek/","") | replace(r/\/$/, "")}}.md"> {% if metadata.date %} <span style="color: #626262">{{ metadata.date.creation | date("D. M. YYYY") }}</span> napsal -- GitLab