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

next/previous #28

Closed
pietroppeter opened this issue Jun 18, 2021 · 4 comments · Fixed by #29
Closed

next/previous #28

pietroppeter opened this issue Jun 18, 2021 · 4 comments · Fixed by #29

Comments

@pietroppeter
Copy link
Owner

should be rather straightforward to implement:

  • looking at document.mustache starting from this line but also in a later section we need to provide (if relevant) a next or previous object with a link field inside the context (or maybe we can simplify and provide next and previous fields directly as link, do not see why the need for a more complex object).
  • this next and previous links must be generated in nimibook.docs while processing the toc
@HugoGranstrom
Copy link
Collaborator

  • I agree that it sounds easier and more obvious to just have next and previous fields in the context 👍
  • OK, does the mitems iterate in the correct order already? Or will we have to iterate over index instead to be able to set previous = entries[i-1] and next = entries[i+1]?

@pietroppeter
Copy link
Owner Author

It should iterate correctly but I guess iterating over the index is simpler in this case

@pietroppeter
Copy link
Owner Author

Are you planning to pick this up? ;)

@HugoGranstrom
Copy link
Collaborator

It should iterate correctly but I guess iterating over the index is simpler in this case

Ok great! 👍

How hard can it be? I have it all lined up before me on a silver plate. Of course I will stumble upon some obscure bug if I try it 🤣 I'm in! 😎

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 a pull request may close this issue.

2 participants