aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/post.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-03-09 03:14:44 +0100
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-03-09 03:14:44 +0100
commitde1d7f85f5f67b269178ea05b7c59deb21ac1720 (patch)
tree3125810eecb495e9ce216dd95561cd1dd3977235 /nikola/post.py
parentc14a6f46d2a76a9c228b6c2543939315068fad5f (diff)
parentfa50632a9d87c3989566fed3e49c160a132e0d14 (diff)
Merge tag 'upstream/6.4.0'
Upstream version 6.4.0
Diffstat (limited to 'nikola/post.py')
-rw-r--r--nikola/post.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nikola/post.py b/nikola/post.py
index 810474b..5cf7236 100644
--- a/nikola/post.py
+++ b/nikola/post.py
@@ -194,6 +194,9 @@ class Post(object):
# If mathjax is a tag, then enable mathjax rendering support
self.is_mathjax = 'mathjax' in self.tags
+ def __repr__(self):
+ return '<Post: {0}>'.format(self.source_path)
+
def _has_pretty_url(self, lang):
if self.pretty_urls and \
self.meta[lang].get('pretty_url', '') != 'False' and \
@@ -493,7 +496,7 @@ class Post(object):
pieces = [_f for _f in pieces if _f and _f != '.']
link = '/' + '/'.join(pieces)
if absolute:
- link = urljoin(self.base_url, link)
+ link = urljoin(self.base_url, link[1:])
index_len = len(self.index_file)
if self.strip_indexes and link[-(1 + index_len):] == '/' + self.index_file:
return link[:-index_len]