Documentation
The documentation sidebar links directly to source files on GitHub, but HTML builds still include copies of the reStructuredText sources under _sources. These copies unnecessarily increase the size and file count of the build output.
The sidebar source links also need to account for the documentation version:
- “Show source” always points to CPython’s main branch, including when viewing documentation for released versions.
- “Show translation source” can point to a nonexistent branch when viewing development documentation.
I propose to disable source copying while preserving the sidebar actions, and make both source links point to the appropriate branches for the documentation being viewed.
A local build comparison found that disabling source copying removed 554 files and reduced the output size by approximately 12.72 MiB. Build time improved only slightly; the main benefit is smaller build output.
Linked PRs
Documentation
The documentation sidebar links directly to source files on GitHub, but HTML builds still include copies of the reStructuredText sources under
_sources. These copies unnecessarily increase the size and file count of the build output.The sidebar source links also need to account for the documentation version:
I propose to disable source copying while preserving the sidebar actions, and make both source links point to the appropriate branches for the documentation being viewed.
A local build comparison found that disabling source copying removed 554 files and reduced the output size by approximately 12.72 MiB. Build time improved only slightly; the main benefit is smaller build output.
Linked PRs