Skip to content

Commit

Permalink
Added documentation and a deprecation warning in code. fix #2086.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Sep 22, 2015
1 parent 4b3d125 commit 1725a5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES.txt
Expand Up @@ -20,6 +20,12 @@ Bugfixes
* /robots.txt was never being built (Issue #2098)
* SVG thumbnails (Issue #2094)

Deprecations
------------

* Post.section_link is now deprecated (Issue #2086). Use
site.link('index_section_path', post.section_slug()) instead.

New in v7.7.1
=============

Expand Down
2 changes: 2 additions & 0 deletions nikola/post.py
Expand Up @@ -745,6 +745,8 @@ 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('index_section_path', post.section_slug()) instead.")
if lang is None:
lang = nikola.utils.LocaleBorg().current_lang

Expand Down

0 comments on commit 1725a5a

Please sign in to comment.