sphinx-singlehtml-anchors
sphinx-singlehtml-anchors is an experimental Sphinx extension that gives targets in singlehtml output document-qualified IDs. It is intended to provide community testing for a future fix to sphinx-doc/sphinx#4814.
The extension supports released Sphinx versions from 8.1 through 9.x across both SingleFileHTMLBuilder.fix_refuris() lifecycle behaviors:
Sphinx 8.1.x, where Sphinx calls fix_refuris()
Sphinx 8.2.x through 9.x, where the extension supplies the omitted calls
Sphinx versions containing the restoration proposed by sphinx-doc/sphinx#14241
Documentation
The live singlehtml demonstration contains repeated section and footnote targets and compares builds with and without the extension.
Installation
Install the package and add it to conf.py:
extensions = [
"sphinx_singlehtml_anchors",
]
Then build normally:
sphinx-build -M singlehtml docs docs/_build
Target format
Document targets retain Sphinx’s existing form:
#document-guide/chapter
Targets within a document include both the source document and original ID:
#document-guide/chapter--purpose
This changes existing singlehtml deep links. The extension is therefore published as experimental while the target scheme and compatibility behavior are tested.
Development
Run the complete compatibility and static-check suite:
tox
The compatibility matrix covers Sphinx 8.1, 8.2, 9.1, and the proposed fix_refuris() restoration.
Prior art
The implementation builds on lessons from:
Metadata
Release files for sphinx-singlehtml-anchors 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx_singlehtml_anchors-0.1.0.tar.gz | 12.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_singlehtml_anchors-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / sphinx_singlehtml_anchors-0.1.0.tar.gz
| Download URL | sphinx_singlehtml_anchors-0.1.0.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8ae693284049ce949dbbb7f80c756122fdf4e0e103de35a9cf1a2647611323f
|
|
BLAKE2b-256 checksum How to use checksums |
5438df8d2ac8f93454a14977014758251e231c9c0209a4e0fb2fa64a5e30df95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / sphinx_singlehtml_anchors-0.1.0-py3-none-any.whl
| Download URL | sphinx_singlehtml_anchors-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a696880347f3e902768073faf041f8913b7863751a1c6dda633cae6bd013d63
|
|
BLAKE2b-256 checksum How to use checksums |
af72a023ae5c8f9aa5424e6b487e3d0dbc88fdca502f7c105e3e43cf9745a850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|