docs: update build for new readthedocs addons #1207
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
See https://about.readthedocs.com/blog/2024/07/addons-by-default/.
There are technically two separate things going on, although the blog post really only highlights the first one:
tl;dr: many words, few changes.
1. readthedocs addons
(Re-)Implements the bottom-right flyout menu, plus a couple other things. See the repo and blog post.
There aren't many changes for us here in practice; compared to the build-time extension, mainly a couple minor visual updates of the flyout menu and version warning banners.
This now also leaves sphinx' search feature alone and doesn't patch it to use RTD's API, so manually setting
docsearch_disabled
on our end isn't required anymore.Timeline
Can be enabled/disabled via a toggle in the dashboard, will be enabled for everyone in October.
2.
conf.py
changesPreviously, RTD would append a bunch of stuff to
docs/conf.py
at build time, which was rather annoying sometimes.html_baseurl
, and inserted a bunch of values into thehtml_context
for templatesNot many changes here either; we already set
html_baseurl
, and the only context value used in templates wasREADTHEDOCS
, which I've added again.Timeline
Not entirely clear atp. This can't be toggled via the dashboard, and will just happen at some point.
From a couple comments I've read, this is slated to be applied to new projects in ~two weeks, and will be enabled for everyone in October as well, but is still technically independent of the addons rollout.
update: diff of old/new context here
Issues
latest
, which I think is fine. It also shows an "old version" banner on all non-stable
versions, which includes e.g. v2.9.2. This doesn't make sense if it's the latest semver version, since it's equivalent tostable
.On GitHub
link to the current document, due to https://github.com/readthedocs/readthedocs.org/blob/bf023534b0a49aca1e0336ffb077ace502fc5b63/readthedocs/proxito/views/hosting.py#L429.conf.py
changesChecklist
pdm lint
pdm pyright
Footnotes
except those using a custom
build.commands
config ↩