Skip to content

Commit

Permalink
Fix #2126 -- Fix wrong link handler name
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 29, 2015
1 parent cee3b26 commit a2c2084
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.txt
Expand Up @@ -26,7 +26,8 @@ Deprecations
------------

* Post.section_link is now deprecated (Issue #2086). Use
site.link('section_index_link', post.section_slug()) instead.
site.link('section_index', post.section_slug()) instead. (not
'section_index_link', as previously stated in this document)

New in v7.7.1
=============
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/sectionindex.tmpl
Expand Up @@ -11,7 +11,7 @@
{% block content %}
<div class="sectionindex">
<header>
<h2><a href="{{ _link('section_index_link', posts[0].section_slug()) }}">{{ title|e }}</a></h2>
<h2><a href="{{ _link('section_index', posts[0].section_slug()) }}">{{ title|e }}</a></h2>
{% if generate_atom %}
<p class="feedlink"><a href="{{ _link('section_index_atom', posts[0].section_slug()) }}" type="application/atom+xml">{{ messages('Updates') }}</a></p>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base/templates/sectionindex.tmpl
Expand Up @@ -11,7 +11,7 @@
<%block name="content">
<div class="sectionindex">
<header>
<h2><a href="${_link('section_index_link', posts[0].section_slug())}">${title|h}</a></h2>
<h2><a href="${_link('section_index', posts[0].section_slug())}">${title|h}</a></h2>
% if generate_atom:
<p class="feedlink"><a href="${_link('section_index_atom', posts[0].section_slug())}" type="application/atom+xml">${messages('Updates')}</a></p>
% endif
Expand Down
2 changes: 1 addition & 1 deletion nikola/post.py
Expand Up @@ -747,7 +747,7 @@ def section_color(self, lang=None):
def section_link(self, lang=None):
"""Return the link to the post's section (deprecated)."""
utils.LOGGER.warning("Post.section_link is deprecated. Please use " +
"site.link('section_index_link', post.section_slug()) instead.")
"site.link('section_index', post.section_slug()) instead.")
if lang is None:
lang = nikola.utils.LocaleBorg().current_lang

Expand Down
4 changes: 4 additions & 0 deletions sextion_index
@@ -0,0 +1,4 @@
CHANGES.txt: site.link('section_index_link', post.section_slug()) instead.
nikola/data/themes/base-jinja/templates/sectionindex.tmpl: <h2><a href="{{ _link('section_index_link', posts[0].section_slug()) }}">{{ title|e }}</a></h2>
nikola/data/themes/base/templates/sectionindex.tmpl: <h2><a href="${_link('section_index_link', posts[0].section_slug())}">${title|h}</a></h2>
nikola/post.py: "site.link('section_index_link', post.section_slug()) instead.")

0 comments on commit a2c2084

Please sign in to comment.