Sphinx client-side redirects for removed HTML anchors
Project description
sphinx-anchormap
A Sphinx extension providing an anchormap directive for client-side
redirects of removed HTML anchors.
When a section or description is moved or removed, old #fragment
links out in the wild break silently. anchormap lets you declare
redirect entries next to the content; they are resolved at build time,
embedded in the page as JSON, and a small script redirects visitors
from the stale anchor to its new location.
Installation
pip install sphinx-anchormap
Then in conf.py:
extensions = [
"anchor_redirects",
]
Usage
Declare redirects in the document the old anchors used to live on:
.. anchormap::
removed-anchor: :ref:`new-target`
Each entry is old-html-fragment: target. The directive produces no output;
visiting the page with #removed-anchor in the URL redirects to the new
target instead.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_anchormap-0.1.0.tar.gz.
File metadata
- Download URL: sphinx_anchormap-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddb1e0bd8519179adc1a44c1bcd42b8a44cf80b7fad49d2640a9cb98064bbb4
|
|
| MD5 |
3906e3c9dc499de34f2ed9fa9d8de864
|
|
| BLAKE2b-256 |
e0d491bf0c953685ae3daac6c1a23b5944a70181d04893d0e610d76e72fd0b85
|
Provenance
The following attestation bundles were made for sphinx_anchormap-0.1.0.tar.gz:
Publisher:
publish.yml on StanFromIreland/sphinx-anchormap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_anchormap-0.1.0.tar.gz -
Subject digest:
eddb1e0bd8519179adc1a44c1bcd42b8a44cf80b7fad49d2640a9cb98064bbb4 - Sigstore transparency entry: 2214177279
- Sigstore integration time:
-
Permalink:
StanFromIreland/sphinx-anchormap@7739ef59d7f40546d9725668675173586e6b696c -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/StanFromIreland
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7739ef59d7f40546d9725668675173586e6b696c -
Trigger Event:
release
-
Statement type:
File details
Details for the file sphinx_anchormap-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sphinx_anchormap-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a50f75371f7a40f1ae02905483a5f5dc1d254e6b079a97ab35b383b1d3372409
|
|
| MD5 |
eff9775d0408e1ab371eef999f8d5ce0
|
|
| BLAKE2b-256 |
62b0ecbf93f6fa5f1456541702f755fb031c10143dff8f9f089dc1b5b6c7893b
|
Provenance
The following attestation bundles were made for sphinx_anchormap-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on StanFromIreland/sphinx-anchormap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_anchormap-0.1.0-py3-none-any.whl -
Subject digest:
a50f75371f7a40f1ae02905483a5f5dc1d254e6b079a97ab35b383b1d3372409 - Sigstore transparency entry: 2214177715
- Sigstore integration time:
-
Permalink:
StanFromIreland/sphinx-anchormap@7739ef59d7f40546d9725668675173586e6b696c -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/StanFromIreland
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7739ef59d7f40546d9725668675173586e6b696c -
Trigger Event:
release
-
Statement type: