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

Plugin to change previous/next post to reflect section indices instead of global index #204

Merged
merged 8 commits into from Jan 13, 2017

Conversation

wirew0rm
Copy link
Contributor

@wirew0rm wirew0rm commented Jan 13, 2017

Plugin to solve getnikola/nikola#2625.

Subscribe to the 'taxonomies_classified' signal and upon receiving it update next_post and previous_post for every post to its successor/predecessor in it's corresponding section.

[Documentation]
author = Alexander Krimm
version = 0.8
website = https://getnikola.com/
Copy link
Member

@Kwpolska Kwpolska Jan 13, 2017

Choose a reason for hiding this comment

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

Perhaps use your own website here?

Copy link
Contributor Author

@wirew0rm wirew0rm Jan 13, 2017

Choose a reason for hiding this comment

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

Unfortunately it is not up yet, i've updated it to point to the plugin page itself.

@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-

# Copyright © 2012-2017 Roberto Alsina and others.
Copy link
Member

@Kwpolska Kwpolska Jan 13, 2017

Choose a reason for hiding this comment

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

2017 only, and your name, goes here

# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

"""Render the taxonomy overviews, classification pages and feeds."""
Copy link
Member

@Kwpolska Kwpolska Jan 13, 2017

Choose a reason for hiding this comment

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

This docstring, and the one in SectionNav, should be more descriptive.

for lang, langposts in site.posts_per_classification['section_index'].items():
for section, sectionposts in langposts.items():
for i, p in enumerate(sectionposts[1:]):
print(p.title)
Copy link
Member

@Kwpolska Kwpolska Jan 13, 2017

Choose a reason for hiding this comment

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

Remove debug print statement here

version = 0.8
website = https://getnikola.com/
version = 0.1
website = https://plugins.getnikola.com/#section_prevnext
Copy link
Member

@Kwpolska Kwpolska Jan 13, 2017

Choose a reason for hiding this comment

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

that isn’t going to be the URL anymore. You can use your own homepage here, or whatever else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants