A Sphinx extension to provide redirection to an entity by its ID.
Project description
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
-
Install the extension:
python3 -m pip install sphinx-redirect-by-id
-
Add it to
conf.py
:extensions = [ 'sphinx_redirect_by_id', ]
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
Hashes for sphinx-redirect-by-id-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5a41803ccebd5882ed993bb14c3c2483f984a549f69aea7f33101d14ac4ef0c |
|
MD5 | c476fedf2d5754821f4c4ccbdbbe8cd9 |
|
BLAKE2b-256 | d6e498c46260d3b0a6b5dc7dac77f7d0bec2d4d239d60bc6d6dce2380e82088a |
Hashes for sphinx_redirect_by_id-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a9553439d80c59831e97d43f9e4dd826ef6bd7841896f3089ebab72e1d40edd |
|
MD5 | bece4963d56b10b20e0e1ee63554a0db |
|
BLAKE2b-256 | f0427433b1e8c27d400b388e78cea761ef4fdfb233acd5e98bb2f14738d82248 |