diff options
| author | 2014-03-09 03:14:40 +0100 | |
|---|---|---|
| committer | 2014-03-09 03:14:40 +0100 | |
| commit | fa50632a9d87c3989566fed3e49c160a132e0d14 (patch) | |
| tree | 81f58cc0dcfbb34710856b59c034bc47c53d91dc /nikola/post.py | |
| parent | 2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff) | |
Imported Upstream version 6.4.0upstream/6.4.0
Diffstat (limited to 'nikola/post.py')
| -rw-r--r-- | nikola/post.py | 5 |
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] |
