You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While converting the numpydoc documentation over to the pydata-sphinx-theme, we encountered the following scenario:
numpydoc's documentation has a "flat" structure - namely, only the master_doc (index.rst) has a .. toctree that refers to every other document. This means that the left sidebar, which is based on the toctree in the given doc, will always be empty.
My first thought was that, since it will always be empty, we could to remove the dead space and allow the content to use the full width (see #146). However, even after #263 it doesn't seem that there's a way to completely get rid of the left sidebar and allow the central content to use the full page width.
My second thought was that we could actually replace the content of the left sidebar with that of the right sidebar, which summarizes the intra-document structure. This turned out to work well (see numpy/numpydoc@0fd8506), but in order to suppress the right sidebar (which is now redundant) I had to add the :notoc: metadata to each file. This latter step felt kind of hacky because a) it's undocumented, so I'm not sure it's intended to be relied upon and b) it requires adding metadata to each source file.
I mostly wanted to raise the issue to illustrate the use-case and see if there were any other suggestions for how to handle this. I like the outcome of the sidebar-swapping solution, but I wasn't sure that this was going to be a viable option moving forward. If a config option were added to control the right sidebar at the project level (e.g. show_right_sidebar=<bool>), then I think this would be a nice solution and potentially worth documenting for other smaller projects with toctree-less docs.
The text was updated successfully, but these errors were encountered:
This might be close-able now? If you use html_sidebars and provide an empty list (e.g., html_sidebars = {"**": []}) then the docs should grow to be wider. @rossbar can we resolve this issue?
While converting the
numpydoc
documentation over to the pydata-sphinx-theme, we encountered the following scenario:numpydoc
's documentation has a "flat" structure - namely, only themaster_doc
(index.rst) has a.. toctree
that refers to every other document. This means that the left sidebar, which is based on thetoctree
in the given doc, will always be empty.My first thought was that, since it will always be empty, we could to remove the dead space and allow the content to use the full width (see #146). However, even after #263 it doesn't seem that there's a way to completely get rid of the left sidebar and allow the central content to use the full page width.
My second thought was that we could actually replace the content of the left sidebar with that of the right sidebar, which summarizes the intra-document structure. This turned out to work well (see numpy/numpydoc@0fd8506), but in order to suppress the right sidebar (which is now redundant) I had to add the
:notoc:
metadata to each file. This latter step felt kind of hacky because a) it's undocumented, so I'm not sure it's intended to be relied upon and b) it requires adding metadata to each source file.I mostly wanted to raise the issue to illustrate the use-case and see if there were any other suggestions for how to handle this. I like the outcome of the sidebar-swapping solution, but I wasn't sure that this was going to be a viable option moving forward. If a config option were added to control the right sidebar at the project level (e.g.
show_right_sidebar=<bool>
), then I think this would be a nice solution and potentially worth documenting for other smaller projects with toctree-less docs.The text was updated successfully, but these errors were encountered: