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

Sidebar template for non-core packages #47

Open
ConorMacBride opened this issue Sep 14, 2022 · 4 comments
Open

Sidebar template for non-core packages #47

ConorMacBride opened this issue Sep 14, 2022 · 4 comments

Comments

@ConorMacBride
Copy link
Member

The top nav bar is hardcoded into the theme, which works well for matplotlib/matplotlib. However, for non-core packages there is no site-wide top level navigation. For matplotlib/pytest-mpl I've created a new sidebar template for the top level navigation: https://github.com/matplotlib/pytest-mpl/blob/main/docs/_templates/mpl_third_party_sidebar.html. This sidebar is set to appear above any existing "Section Navigation" sidebars on all pages. https://matplotlib.org/pytest-mpl/latest/index.html

Is this something that should be included in this theme so other non-core packages can have a consistent design? Or maybe you'd rather non-core packages just override the nav bar?

@jklymak
Copy link
Member

jklymak commented Sep 14, 2022

Can you point to your docs? I think we mostly made this theme for things like third-party-page that are supposed to look like they are part of the Matplotlib docs, hence the hard-coded navigation. But if we can make it more flexible to affiliated docs, we can look into doing that.

@ConorMacBride
Copy link
Member Author

@dstansby
Copy link
Member

I think it makes sense to move the top nav bar config out of the theme and into matplotlib and mpl-third-party. For other projects it doesn't make sense to have these links that point to matplotlib package documentation.

@jklymak
Copy link
Member

jklymak commented Jan 19, 2024

I'd be for making this modular somehow. However, this theme is meant for our docs, and hardwiring the nav was one of the original motivations, so that we don't have to change it in 5 places. However, again if there is a way to allow other projects to override our default, then that would be most welcome.

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

No branches or pull requests

3 participants