-
Notifications
You must be signed in to change notification settings - Fork 326
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
uneven spacing between navbar items #302
Comments
@drammock cool that you are trying out this theme! I ran the mne-docs myself as well to check what is happening, and this is caused by the generated This is a bug in the theme (we should filter out those in-page headers from the toctree, because in the navbar we only want links to actual pages). With that change I get a better result: This might also befixed by #219, or easier to fix after that PR, but didn't check that |
@drammock one additional thing I notice is that, as you can see in my screenshot above, that both "Documentation" and "Tutorials" is highlighted as active in the navbar. I think this is caused by having the tutorials multiple times in a sphinx toctree. The main index.rst has
but then the
so the tutorial/examples/API appear both in the top-level toctree, as in the "Documentation" sub-toctree. I would personally advise to put the subpages in the
And on that Documentation overview page, you can still include links to tutorials/examples/API manually. |
Awesome, thanks for figuring that out! And for the PR fixing it for me :)
Yes, I did that on purpose as an experiment, and you are right about the cause (being in the TOC tree twice).
I want to keep those pages as orphans, because I don't actually want them to show up in the linear order defined by the TOC tree (i.e., I want the next/previous buttons to go straight from the documentation overview to the tutorials page). But I also want tutorials & examples to show up in the top navbar. Thinking back, I think I was motivated by the overview page having an empty sidebar and that looking weird, but I realize now I can just suppress the (empty) sidebar on that page and (I think) the content will get wider. I'll try that. |
Ah, I understand the reasoning now. The previous/next buttons are entirely determined by sphinx' toctree structure AFAIK, so I don't think there is an easy way to otherwise get around that. |
just a note to confirm that your fix worked @jorisvandenbossche; after merging your PR our CIs built a normal-looking top nav: https://24666-1301584-gh.circle-artifacts.com/0/dev/index.html |
I'm seeing large whitespace in between items of the top navbar that I'm certain isn't meant to be there. Screenshot of our homepage built with 0.4.1:
...and the same page built against current master (ab92898):
The browser console shows that there are many empty
li
items in between our nav items "tutorials" and "examples":Any idea what is causing this?
EDIT here's the site: https://github.com/drammock/mne-python/tree/new-website-theme/doc
The text was updated successfully, but these errors were encountered: