Skip to main content

Redirect By ID for Sphinx

This extension originated as part of the discussion in https://github.com/sphinx-doc/sphinx/issues/9574.

When building a Sphinx project into HTML, the permalinks on entities still contains the specific page the entity is located on, along with the ID of the entity. If the pages are later restructured and entities are moved to different pages, the old permalinks will be dead.

This extension adds a new page redirect.html which can be given an ID. The page will use the existing search index of the project to redirect to the page where the entity is located. For example, if you have a page api.html where a Python function f is documented, then its permalink may be https://example.com/api.html#f. If you then browse to https://example.api.html?q=f you will be redirected to https://example.com/api.html#f.

Installation

  1. Install the extension:

    python3 -m pip install sphinx-redirect-by-id

  2. Add it to conf.py:

    extensions = [
        'sphinx_redirect_by_id',
    ]
    

Metadata

Release files for sphinx-redirect-by-id 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-redirect-by-id 0.1.3
File Size Uploaded Provenance
sphinx-redirect-by-id-0.1.3.tar.gz 10.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-redirect-by-id 0.1.3
File Interpreter ABI Platform
sphinx_redirect_by_id-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / sphinx-redirect-by-id-0.1.3.tar.gz

Download URL sphinx-redirect-by-id-0.1.3.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c5a41803ccebd5882ed993bb14c3c2483f984a549f69aea7f33101d14ac4ef0c
BLAKE2b-256 checksum
How to use checksums
d6e498c46260d3b0a6b5dc7dac77f7d0bec2d4d239d60bc6d6dce2380e82088a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / sphinx_redirect_by_id-0.1.3-py3-none-any.whl

Download URL sphinx_redirect_by_id-0.1.3-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a9553439d80c59831e97d43f9e4dd826ef6bd7841896f3089ebab72e1d40edd
BLAKE2b-256 checksum
How to use checksums
f0427433b1e8c27d400b388e78cea761ef4fdfb233acd5e98bb2f14738d82248
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for sphinx-redirect-by-id 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page