contribution-guide.org icon indicating copy to clipboard operation
contribution-guide.org copied to clipboard

Weird sidebar index behavior

Open remram44 opened this issue 9 years ago • 3 comments

I can't pretend to know what the intended behavior is, but it's probably not that:

Sidebar

Clicking on the plus "+" next to "Contributing to Open Source Projects" moves the other items under that one and turns everything white.

remram44 avatar Feb 01 '16 01:02 remram44

According to http://www.sphinx-doc.org/en/stable/rest.html#sections the document title should probably use '*', or else the section hierarchy start with '-' and not '='.

jhermann avatar Feb 05 '16 14:02 jhermann

Thanks for the report! That is pretty wacky looking.

I think this is a bug in the sidebar templates for the sphinx_rtd_theme which is what my doc host ReadTheDocs defaults to.

When I build the docs locally and force either default (old Sphinx 1.2- default) or empty theme (which uses Alabaster, the new actual default in Sphinx 1.3+), the resulting bullet nav lists look pretty normal. And the overall header levels are also pretty normal & identical to what I use everywhere else (and I've been Sphinxing for a long time).

Poking at the theme a bit, I think this is one of two things:

  • The JS & styling is making incorrect assumptions because of the one-page nature of the site; it should probably just not be including that topmost page element, or if it is, indent the rest & skip the 'expando' plus sign.
  • The HTML for the ToC changed sometime in core Sphinx (the theme doesn't generate that snippet, it comes from Sphinx itself) and the theme is out of date somehow.

I don't have a ton of time to dig into this and it's relatively minor in the grand scheme of things. Open to suggestions but I suspect this is gonna require a patch to the theme and not this project. Alternately, I might just change my conf file to render in Alabaster (new Sphinx default...also a theme I own) and call it a day.

Input accepted :)

bitprophet avatar Feb 08 '16 06:02 bitprophet

YEARS LATER...

This is somehow still buggy even under Sphinx 5.x and sphinx-rtd-theme 1.2.0! 😖

I doublechecked jhermann's assertion about the headers, but as I thought, the characters used are purely convention - Sphinx doesn't actually care. (I'd been writing Sphinx documents for years before I made this site and the header style I use has always worked fine before, and as noted in 2016, worked in other themes.)

I don't have additional time for this now but if I did, I would be trying to 'bisect' the document by nuking parts of it to see if there's a specific element messing everything up or something. Or copy in the sample documentation from the theme's own docs (its header layout is pretty basic too though).

bitprophet avatar Feb 24 '23 01:02 bitprophet