Docs: Fix build preview banner by hugovk · Pull Request #104082 · python/cpython
There should be a banner at the top of PR build previews for docs. Here's it working on this branch as a PR on my fork:
But for some reason it's missing for this upstream:
TODO
The code to control this:
| # Deployment preview information | |
| # (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html) | |
| repository_url = os.getenv("READTHEDOCS_GIT_CLONE_URL") | |
| html_context = { | |
| "is_deployment_preview": os.getenv("READTHEDOCS_VERSION_TYPE") == "external", | |
| "repository_url": repository_url.removesuffix(".git") if repository_url else None, | |
| "pr_id": os.getenv("READTHEDOCS_VERSION") | |
| } |
Let's start with a draft PR to debug the env vars.
