Fix #2069 -- proper locale support for section links #2070
Conversation
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@@ -745,11 +745,16 @@ def section_color(self, lang=None): | |||
|
|||
def section_link(self, lang=None): |
felixfontein
Sep 11, 2015
Contributor
Why isn't this simply using the index_section_path
path handler of the indexes
plugin?
Why isn't this simply using the index_section_path
path handler of the indexes
plugin?
Kwpolska
Sep 12, 2015
Author
Member
That’s a good question. I just fixed the existing code (by @Aeyoun). I looked a bit further, and it seems that the Post class does not have access to the Nikola site object, and therefore cannot talk to site.link()
nor to the plugin manager.
That’s a good question. I just fixed the existing code (by @Aeyoun). I looked a bit further, and it seems that the Post class does not have access to the Nikola site object, and therefore cannot talk to site.link()
nor to the plugin manager.
felixfontein
Sep 13, 2015
Contributor
Maybe we should deprecate this function and encourate people to use site.link()
instead. A Post
object should know as little as possible about what other plugins are producing (well, except the pages
and the posts
plugins).
Maybe we should deprecate this function and encourate people to use site.link()
instead. A Post
object should know as little as possible about what other plugins are producing (well, except the pages
and the posts
plugins).
ralsina
Sep 15, 2015
Member
+1 to just using link. We don't need to have the post access the Nikola object either, links just need to be resolved after they are written in the document, when copying to output. In the meantime, link://foo/bar IS a valid and awesome link for us ;-)
+1 to just using link. We don't need to have the post access the Nikola object either, links just need to be resolved after they are written in the document, when copying to output. In the meantime, link://foo/bar IS a valid and awesome link for us ;-)
Fix #2069 -- proper locale support for section links
This is #2069.
cc @Aeyoun, @ralsina.
Signed-off-by: Chris Warrick kwpolska@gmail.com