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
I'm also seeing this. Originally my site consisted of two pages: an index and a "what's new". The index had a single hidden TOC with maxdepth 1. No customizations were done to the theme. No matter what I do I can't get rid of the left sidebar nor can I get it to display anything except "Section Navigation". Even if I add a third page nothing changes. I've tried unhiding the TOC. I've tried numbering the TOC. Nothing changes this from being just "Section Navigation".
@drammock Sorry for the late reply. The one I'm working on is the scikit-learn homepage, see scikit-learn/scikit-learn#28132. It is a bit too large, so I crafted a minimal reproducible example instead. The version is pydata-sphinx-theme==0.15.2.
That seems like valid logic to me unless I'm misunderstanding. In my case I have a parent TOC and the page I'm on could have a side bar, but the side bar is empty.
@djhoese Sorry I'm a bit confused now. From what I see you have on the index page
.. toctree::
:maxdepth:1:hidden:whats-new
and no toctree on the whats-new page, so I'm thinking there should indeed be nothing in the primary sidebar of the whats-new page, and the primary sidebar should not show up. Is that not what you mean? If so what do you expect to see in the primary sidebar?
In my case I have a parent TOC
But index is your root_doc so things (in your case whats-new) are showing in the top navbar I think, if I'm not misunderstanding how things should work.
@djhoese using your docker image, I can make the sidebar disappear on your whats-new page by adding this to conf.py:
html_sidebars= {
'whats-new': []
}
It is supposed to happen automatically when the sidebar elements are all empty, but for some buggy reason your whats-new page is ending up with a single empty TOC element:
<divclass="bd-toc-item navbar-nav"></div>
If on the contrary you were expecting a TOC to actually appear there (below the "section navigation" heading) then there's a misunderstanding about the theme: your homepage is the site's root, and the whats-new page is the (only) first-level page; the left sidebar TOC by default would show any pages below that first-level page (of which there are none). The first-level pages only show up (by default) in the top navbar.
@Charlie-XIAO I haven't had time to look at your site yet, but will try to do so soon.
Is that not what you mean? If so what do you expect to see in the primary sidebar?
Honestly, I don't know. I think my thinking for my last comment was "if it is going to show the sidebar, then it must be considering the hidden TOC, so in that case there should be something shown". But yeah, if it isn't supposed to do anything with a hidden TOC as far as the sidebar goes then it makes sense that it is including the sidebar erroneously but the rest of the logic is correctly not finding anything to put in the sidebar (because it is hidden).
@drammock Thanks. All my googling kept leading to the navigation and sidebars page here:
which doesn't mention the import html_sidebars configuration. I wouldn't have commented and looked through github issues if I would have just found this section from my searches:
I haven't had time to look at your site yet, but will try to do so soon.
No hurries @drammock. Except from the site that linked, in #1682 I further provided a minimal reproducible site and corresponding tests, if those may help.
Activity
pydata-sphinx-theme
scikit-learn/scikit-learn#28084djhoese commentedon Jan 24, 2024
I'm also seeing this. Originally my site consisted of two pages: an index and a "what's new". The index had a single hidden TOC with maxdepth 1. No customizations were done to the theme. No matter what I do I can't get rid of the left sidebar nor can I get it to display anything except "Section Navigation". Even if I add a third page nothing changes. I've tried unhiding the TOC. I've tried numbering the TOC. Nothing changes this from being just "Section Navigation".
drammock commentedon Jan 24, 2024
@djhoese and @Charlie-XIAO can you please provide
djhoese commentedon Jan 24, 2024
Of course, sorry. Here's the relevant packages:
Docs source: https://gitlab.ssec.wisc.edu/cspp_geo/geosphere/geosphere-docs
Published site: https://geosphere.ssec.wisc.edu/docs/
Primary problem page (the only non-index page in my site): https://geosphere.ssec.wisc.edu/docs/whats-new.html
Edit: The source repository includes a Dockerfile that does all the dependency installs and building of the site.
Charlie-XIAO commentedon Jan 25, 2024
@drammock Sorry for the late reply. The one I'm working on is the scikit-learn homepage, see scikit-learn/scikit-learn#28132. It is a bit too large, so I crafted a minimal reproducible example instead. The version is
pydata-sphinx-theme==0.15.2
.Charlie-XIAO commentedon Jan 28, 2024
I think the cause is here:
pydata-sphinx-theme/src/pydata_sphinx_theme/toctree.py
Lines 74 to 77 in c04f042
This assumption does not seem to be correct.
I opened #1682 to propose a fix. Hopefully it can be included in 0.15.3 otherwise I would have to pin 0.14.x in scikit-learn.
djhoese commentedon Jan 28, 2024
That seems like valid logic to me unless I'm misunderstanding. In my case I have a parent TOC and the page I'm on could have a side bar, but the side bar is empty.
Charlie-XIAO commentedon Jan 28, 2024
@djhoese Sorry I'm a bit confused now. From what I see you have on the
index
pageand no toctree on the
whats-new
page, so I'm thinking there should indeed be nothing in the primary sidebar of thewhats-new
page, and the primary sidebar should not show up. Is that not what you mean? If so what do you expect to see in the primary sidebar?But
index
is yourroot_doc
so things (in your casewhats-new
) are showing in the top navbar I think, if I'm not misunderstanding how things should work.drammock commentedon Jan 28, 2024
@djhoese using your docker image, I can make the sidebar disappear on your whats-new page by adding this to
conf.py
:It is supposed to happen automatically when the sidebar elements are all empty, but for some buggy reason your whats-new page is ending up with a single empty TOC element:
If on the contrary you were expecting a TOC to actually appear there (below the "section navigation" heading) then there's a misunderstanding about the theme: your homepage is the site's root, and the whats-new page is the (only) first-level page; the left sidebar TOC by default would show any pages below that first-level page (of which there are none). The first-level pages only show up (by default) in the top navbar.
@Charlie-XIAO I haven't had time to look at your site yet, but will try to do so soon.
djhoese commentedon Jan 28, 2024
Honestly, I don't know. I think my thinking for my last comment was "if it is going to show the sidebar, then it must be considering the hidden TOC, so in that case there should be something shown". But yeah, if it isn't supposed to do anything with a hidden TOC as far as the sidebar goes then it makes sense that it is including the sidebar erroneously but the rest of the logic is correctly not finding anything to put in the sidebar (because it is hidden).
@drammock Thanks. All my googling kept leading to the navigation and sidebars page here:
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/navigation.html
which doesn't mention the import html_sidebars configuration. I wouldn't have commented and looked through github issues if I would have just found this section from my searches:
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html#primary-sidebar-left
Thanks everyone.
Charlie-XIAO commentedon Jan 29, 2024
No hurries @drammock. Except from the site that linked, in #1682 I further provided a minimal reproducible site and corresponding tests, if those may help.
DOC: Hide empty navigation
Hide empty section navigation
Update FlexConfirmMail for Outlook 2 (#8)