Skip to content

Commit

Permalink
Fix #2709 -- add {post_title} tag for Read More links
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 5, 2017
1 parent 6b803ce commit cd88c53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,8 @@ New in master
Features
--------

* Add ``{post_title}`` tag for Read More links (Issue #2709)

Bugfixes
--------

Expand Down
1 change: 1 addition & 0 deletions nikola/conf.py.in
Expand Up @@ -806,6 +806,7 @@ IMAGE_FOLDERS = {'images': 'images'}
# {min_remaining_read} The string “{remaining_reading_time} min remaining to read” in the current language.
# {paragraph_count} The amount of paragraphs in the post.
# {remaining_paragraph_count} The amount of paragraphs in the post, sans the teaser.
# {post_title} The title of the post.
# {{ A literal { (U+007B LEFT CURLY BRACKET)
# }} A literal } (U+007D RIGHT CURLY BRACKET)

Expand Down
3 changes: 2 additions & 1 deletion nikola/post.py
Expand Up @@ -694,7 +694,8 @@ def text(self, lang=None, teaser_only=False, strip_html=False, show_read_more_li
reading_time=self.reading_time,
remaining_reading_time=self.remaining_reading_time,
paragraph_count=self.paragraph_count,
remaining_paragraph_count=self.remaining_paragraph_count)
remaining_paragraph_count=self.remaining_paragraph_count,
post_title=self.title(lang))
# This closes all open tags and sanitizes the broken HTML
document = lxml.html.fromstring(teaser)
try:
Expand Down

0 comments on commit cd88c53

Please sign in to comment.