-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Collapsable table of contents has changed #9868
Comments
It seems you are using an old version of the theme in the incorrect result. That's seems to be the problem. Right now, you cannot use the combination You can pin your dependencies using a |
@humitos, thank you for the quick response. I was able to pin the versions of the packages to get the correct result. The docs generated using the release candidate version of sphinx-rtd-theme looks good as far as I can tell. Our requirements file did not previously include sphinx or sphinx_rtd_theme. The mismatched versions of the packages were installed in the step before our requirements.txt files were read, which does not specify versions of the packages in the pip command. It sounds like the next sphinx-rtd-theme release is in progress, so this won't be an issue soon. Perhaps it would be good to use explicit versions for sphinx and sphinx_rtd_theme in that pip command to prevent these type of issues in the future? Thank you again for your help! |
I'm pretty happy to read this! 🎉 -- cc @benjaoming
There is a lot of legacy context about why we went from pinning these to not pinning these (... and I think that I don't even remember all of it at this point 😅 ). I don't think we will come back to pin them soon, tho 😄 In any case, as you mentioned, once 1.2.0 is released, it will be solved for all the users automatically due to pip's package resolution 💪🏼 |
@humitos I also noticed some strange display issues which I was able to trace back to this same issue. Thanks to your recommendation, adding this to requirements.txt has fixed it:
I also had not previously pinned a version of sphinx or sphinx_rtd_theme, so I was confused that an incompatible pair was used by default in the build. I have two questions:
|
These are really good questions! Sphinx 6 did make us have to do some extra work on the theme in order to avoid regressions. We wrote a blog post that explains what's happening and how to use sphinx-rtd-theme 1.2.0rc2: https://blog.readthedocs.com/sphinx6-upgrade/
Well, we had a medium priority of getting the theme released with compatibility for Sphinx 6 before it happened. It was a lot of Q&A'ing and not so much coding.
If you see only sphinx-rtd-theme in the landscape, then the explanation is this: The theme is supporting A LOT of Sphinx and docutils versions at the same time and it's difficult to Q&A new releases. This legacy is being reduced in upcoming releases. However, it's important to note that most documentation projects use many other Sphinx extensions. When a new Sphinx release comes out, everything tends to be broken for a little while until new releases are sorted out. It's best to pin. Pinning doesn't mean to use
Pinning is about reproducible builds and reducing the risk that documentation builds suddenly break in annoying and distracting and often counter-productive ways. There's a really good Read the Docs documentation article about it 😊 https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html |
Details
Within the last few weeks the table of contents on our documentation has stopped displaying correctly. We haven't made any changes to our docs that would explain this change. It looks like the versions of Python packages used in the builds have changed. From the build logs, I noticed the following differences:
Correct result used:
New (incorrect result) used:
Please let me know if you need any additional information from me. Thanks!
Expected Result
I expect the table of contents to include [+] icons to expand the 5.2, 5.5, 5.6, etc. sections seen in this build:
https://metplus.readthedocs.io/en/v5.0.0/Users_Guide/configuration.html
Actual Result
The [+] icons are no longer displayed:
https://metplus.readthedocs.io/en/bugfix_main_v5.0_no_changes/Users_Guide/configuration.html
The text was updated successfully, but these errors were encountered: