-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Toc not expanding #445
Comments
Can you please give us some more information on the build, including a link if possible. |
Additionally I also see this issue with And in case that's a CSS/JS issue, I see this in Firefox Nightly, Chrome 58 and Edge. |
If it helps debugging, you can see this issue in action here: http://adafruit-beaglebone-io-python.readthedocs.io It seems to be a few separate issues. Navigation items appear twice:
Upon clicking on the '+' sign of the collapsed items, they are expanded, and as the comment and gif animation from @kadrach show, a grey overlay is shown. That adds the correct indentation to the items underneath the expanded level, but still shows the expanded (and redundant) items underneath. If you happen to test it on the link given, you'll notice that after expanding the "Adafruit Beaglebone I/O Python API" header, the "Pins for SPI0 and SPI1" subheader is again shown twice under the expanded items: once expanded, and once collapsed under the right parent header: "SPI – Serial Peripheral Interface". For comparison, the Blender docs seem to show the expected behaviour with regards to collapsing/expanding navigation items and their indentation. The only workaround I've found to make the TOC navigation somehow sane is to use:
This does not produce the intended results, but at least it shows:
|
I've tracked this to be an issue only when you use a single If you change the layout of your documentation to be a master |
This also happens when building |
I believe it was in #375 Singlehtml builds were breaking on RTD, but I don't fully remember what the actual issue was. |
Think it might have been a sphinx bug that has since been fixed perhaps. |
I had the same challenge to overcome, and this is the solution that works. My documentation does not have a lot of content so I initially decided to maintain it in a single file. I switched to distributing it across multiple files "just" for making the sidebar to work as expected. That's OK for me. |
I think I'm still seeing the same issue here. I don't have a version of |
Until readthedocs/readthedocs.org#4096 is merged, you are not using the latest theme. I don't yet know whether this is a Sphinx or theme issue yet though. |
This is not resolved. Single file builds still have a broken toc. Please reopen. This is not a new issue either, it has been around for about 4 years now and it never got fixed. Really. |
Commenting so that thread will be bumped. This issue is not resolved (see comment above). Please reopen this issue. |
@LukasVik could you please share more details of where are you seeing this? Project URL, build logs, and so forth? |
Hello @astrojuanlu The MWE above, #445 (comment), works now from what I can tell. But adding a sub-heading yields similar behavior as the error encountered there. Environment:
index.rst: Model theory and selection
==========================
Description
-----------
Sub-heading
___________
Theoretical model
-----------------
conf.py (defaults from # -- Project information -----------------------------------------------------
project = 'MWE'
copyright = '2022, MWE'
author = 'MWE'
# The full version, including alpha/beta/rc tags
release = 'MWE'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] Command run: make html
firefox _build/html/index.html Result: After clicking the +: After clicking the + at "Description" |
Thanks for the reproducer @LukasVik . Looks like this is worth reopening. |
In the last image in the recent example above (after expanding "Description"), I would also expect "Theoretical model" to stay on the same level as "Description" and not indent with "Sub-heading". |
@SeanSnyders Yes, agreed! |
When I create the sphinx doc the table of contents is not expandable. When I click on the + sign it only overlays a gray colour on all the items below but does not expand anything.
The text was updated successfully, but these errors were encountered: