From: Vladimír Vondruš Date: Mon, 11 Sep 2017 11:22:27 +0000 (+0200) Subject: m.gh: repository link title doesn't need to be a full URL. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=1f5536e64b0110e42254c2223fd9e96375b62cfc;p=blog.git m.gh: repository link title doesn't need to be a full URL. Because it's obvious what's meant. --- diff --git a/pelican-plugins/m/gh.py b/pelican-plugins/m/gh.py index 6b086a0c..2c345403 100644 --- a/pelican-plugins/m/gh.py +++ b/pelican-plugins/m/gh.py @@ -24,7 +24,9 @@ def gh_internal(account, ref, title, link): if not title: title = url else: url = "https://github.com/{}/{}".format(account, ref) - if not title: title = url + if not title: + # if simple profile link, no need to expand to full URL + title = link if not '/' in ref else url return title, url