Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2069 -- proper locale support for section links #2070

Merged
merged 1 commit into from Sep 15, 2015
Merged

Conversation

Kwpolska
Copy link
Member

This is #2069.

cc @Aeyoun, @ralsina.

Signed-off-by: Chris Warrick kwpolska@gmail.com

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska added this to the 7.7.1 milestone Sep 11, 2015
@@ -745,11 +745,16 @@ def section_color(self, lang=None):

def section_link(self, lang=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't this simply using the index_section_path path handler of the indexes plugin?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+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 ;-)

@Kwpolska Kwpolska merged commit 1c74d59 into master Sep 15, 2015
Kwpolska added a commit that referenced this pull request Sep 15, 2015
Fix #2069 -- proper locale support for section links
@Kwpolska Kwpolska deleted the fix-2069 branch December 24, 2015 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants