From 1f5536e64b0110e42254c2223fd9e96375b62cfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Sep 2017 13:22:27 +0200 Subject: [PATCH] m.gh: repository link title doesn't need to be a full URL. Because it's obvious what's meant. --- pelican-plugins/m/gh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.30.2