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

Making expandable/collapsible sidebar navigation + navigation depth configurable #386

Merged

Conversation

jorisvandenbossche
Copy link
Member

Partly addressing #381, in a sense that this makes it easier to turn off the expandable navigation sidebar, and thus you can get back to the behaviour (and performance) of 0.5.2, while having the other enhancements of 0.6.0

When having a site with many files and/or many levels, this can cause a long
build time and larger HTML file sizes. Therefore, it is possible to turn off
the expandable navigation by setting the `collapse_navigation` config option
to True:
Copy link
Member Author

Choose a reason for hiding this comment

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

It feels a bit strange to say you can turn off the expandable navigation by setting an option to True (and in general "collapse" doesn't necessarily indicate that the actual HTML is trimmed), but "collapse_navigation" is consistent with RTD and consistent with sphinx' own terminology of collapse=True/False

Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

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

Other than a minor nitpick I think this is good to go

docs/user_guide/configuring.rst Outdated Show resolved Hide resolved
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
@jorisvandenbossche jorisvandenbossche merged commit ef94624 into pydata:master Apr 16, 2021
@jorisvandenbossche jorisvandenbossche deleted the add-navigation-config branch April 16, 2021 19:30
@jorisvandenbossche
Copy link
Member Author

Thanks!

@tupui
Copy link
Contributor

tupui commented Apr 20, 2021

Sorry if this is silly, my html skills are basic. But, would it be technically possible to use some JS to link to the common sidebar html files? We could then reduce the size of the individual html files in case of huge sidebars.

@jorisvandenbossche
Copy link
Member Author

@tupui see also my comments at #381 (comment) and #364.
I briefly looked into that, and it turns out not to be that simple. The sidebar HTML on each page differs slightly, (eg the paths in href can be different, different element tagged as "active"), so that would require quite a bit of javascript to update that dynamically.
(but I am certainly interested in seeing improvements here!)

Let's maybe discuss further in #364

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

3 participants