chiark
/
gitweb
/
~cjwatson
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dee6069
)
m.gh: repository link title doesn't need to be a full URL.
author
Vladimír Vondruš
<mosra@centrum.cz>
Mon, 11 Sep 2017 11:22:27 +0000
(13:22 +0200)
committer
Vladimír Vondruš
<mosra@centrum.cz>
Tue, 12 Sep 2017 10:06:26 +0000
(12:06 +0200)
Because it's obvious what's meant.
pelican-plugins/m/gh.py
patch
|
blob
|
history
diff --git
a/pelican-plugins/m/gh.py
b/pelican-plugins/m/gh.py
index 6b086a0c047da066eb54bcb18e25950a6c19c07d..2c34540307bbe14f13e1a0f2af07f26fc83f2c76 100644
(file)
--- 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