Skip to content
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

Weird sidebar index behavior #2

Open
remram44 opened this issue Feb 1, 2016 · 3 comments
Open

Weird sidebar index behavior #2

remram44 opened this issue Feb 1, 2016 · 3 comments
Labels

Comments

@remram44
Copy link

remram44 commented Feb 1, 2016

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.

@jhermann
Copy link

jhermann commented Feb 5, 2016

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 '='.

@bitprophet
Copy link
Owner

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 bitprophet added the bug label Feb 8, 2016
@bitprophet
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants