Skip to content

Add previous and next buttons #44

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

Merged
merged 2 commits into from
Nov 20, 2019
Merged

Conversation

choldgraf
Copy link
Collaborator

@choldgraf choldgraf commented Nov 1, 2019

This adds previous and next buttons to each page, as well as binds the key-presses for "left" and "right" to visit the links of previous/next.

I couldn't demo this on the pandas documentation contained in this theme, but it worked on a local set of docs I tried. Maybe give it a whirl and see how it feels?

This also adds one other small fix, which is make the right TOC show up on index pages.

@choldgraf
Copy link
Collaborator Author

ping @jorisvandenbossche in case he's not watching this repo :-)

@jorisvandenbossche
Copy link
Member

Can you push this branch to upstream and create a PR from that (instead of from your fork)? I know this is not the common way to work with repo's/forks, but if it are branches on this repo, the demo docs are automatically built with doctr for more easy visual checking of the result.

@choldgraf
Copy link
Collaborator Author

sure - I'm happy to do so.

FWIW I'd also be happy to set up either a CircleCI or a Netlify build for documentation preview, I've found both of those pretty straightforward (though fine using doctr since it's already set up for the repo)

@jorisvandenbossche
Copy link
Member

FWIW I'd also be happy to set up either a CircleCI or a Netlify build for documentation preview, I've found both of those pretty straightforward (though fine using doctr since it's already set up for the repo)

If that would enable making previews for PRs that are coming from forks, that would be very welcome!

@choldgraf
Copy link
Collaborator Author

choldgraf commented Nov 4, 2019

was gonna close this, but just realized that we now have circleci docs, so I'll close the other one since it has more information. I rebase this so circle should start building it

I think the travis errors may be related to closing and re-opening the PR

@choldgraf choldgraf reopened this Nov 4, 2019
@jorisvandenbossche jorisvandenbossche changed the title previous and next buttons Add previous and next buttons Nov 5, 2019
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

We could maybe later make this configurable (so people can turn it off if they don't like it)

@choldgraf
Copy link
Collaborator Author

I modified the style of the nav buttons to be a bit more in-line with the style of other nav elements on the page. Agree that it'd be good to be able to turn this off. Maybe in another PR? I'm rusty on how to pass options through conf.py into the templates...

@jorisvandenbossche
Copy link
Member

Yep, let's treat this as "good enough for now" ;) And thanks for the update!

@jorisvandenbossche
Copy link
Member

Opened #56 for possible follow-ups

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.

2 participants