-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
DOC: Switch docs to pydata-sphinx-theme #313
DOC: Switch docs to pydata-sphinx-theme #313
Conversation
+1 for switching, let me know once CircleCI is happy and I should look |
Looks like the Is this a strong enough incentive to drop support for (or at least stop testing on) sphinx versions <1.8? |
Another option would be to run the |
... oh 1.8 as the minimum, not 2.0. That seems okay to me. |
25b57b6
to
3db383a
Compare
Okay, the minimum tested version has been bumped from 1.6.5 -> 1.8. I think this is ready for a review of the build artifact to see if there are any obvious problems from the theme switch. One thing I noticed is that |
I don't really like how the left panel is not used. How about a structure more like either of these? https://pandas.pydata.org/docs/getting_started/index.html In other words, could the first-level bullets from under what is currently the "Documentation" become the options on the left? That way they will show up on every page, and make better use of the horizontal space, which is nice. |
I spent a little time on this and it turns out to be trickier than I was initially expecting. AFAICT, the left sidebar is determined by the doc structure given by any My second thought was that I could swap the left sidebar (which is based on |
At least in MNE we get this page (from a toctree): https://mne.tools/dev/python_reference.html Clicking on "most used classes" goes to a page but the left sidebar is still there, and even going to "mne.io.Raw" still has the same setup: https://mne.tools/dev/generated/mne.io.Raw.html#mne.io.Raw @drammock did you have to do something special to get this behavior? Maybe the |
I'm not sure, but it may be that that |
I didn't do anything special to get MNE-Python to work that way @larsoner . My understanding is that the toctree of the master doc determined the top-level navbar, and the left sidebar I think is determined by the toctrees of the first-level children of the master doc. |
That was my understanding as well - the reason why there is no (left) sidebar in |
I also tried locally having a I'm fine with either solution you came up with @rossbar, which do you prefer? |
I prefer your solution @larsoner. Since it's not possible to get rid of/re-purpose the space of the left sidebar, I'd prefer the contents listing to be there rather than in the navbar. I like the way that my solution looks, but I don't like that it depends on undocumented features of the theme which feels too fragile to me. I don't feel strongly though, so I'm happy with whichever. |
I'll push mine and you can look at the rendered version. It makes the top useless, but something somewhere is useless in all of these, and I guess having it be the top will be the most consistent with other projects? |
BTW, I personally think the navbar + sidebar is mostly useful for larger doc sites (like pandas), and so for smaller doc sites like numpydoc, I agree it's better to only use either the navbar or sidebar. With the current solution you posted (#313 (comment)), you get a navbar that is not that useful. I think it should be possible to not make it "sticky", so it scrolls away (with some css).
Which undocumented features did it rely upon? Because looking at the commit you mentioned (0fd8506), this seems fine to me (overriding |
Adding the |
I have a solution with |
I'm happy with this, it's not perfect but no hacks required / it only uses standard config options: https://276-11639513-gh.circle-artifacts.com/0/html/index.html |
Agreed this looks good - the only downside is that there's still the unused space on the left which becomes more pronounced e.g. when tiling the window to half the screen (the right sidebar, which contains useful info, disappears but the left is kept). That's a very minor thing though - I'm happy with this too (and big +1 for the doc title/ordering cleanups) |
Okay let's get this in and we can improve later if someone is motivated |
Thanks @rossbar ! |
FYI, I think (?) you could kill the left bar entirely by providing something like this for
|
NumPy recently switched to the pydata-sphinx-theme for its documentation. The new theme is now deployed for the stable docs as of v1.20. This PR switches the themes so numpydoc's documentation theme is consistent with numpy's.