Skip to content

jahn-junior/sphinx-relabel

Repository files navigation

reLabel logo

reLabel is a tool for redirecting labels in your Sphinx documentation.

In documentation, we go to great lengths to redirect pages as they're moved, but we don't show the same care with Sphinx labels. If external documentation links to your project with Intersphinx, then removing labels will break references to them.

With reLabel, you can redirect removed labels to any existing label in your docs, preventing any surprise Intersphinx breakages.

Usage

Map removed labels to existing labels with the label_redirects option in your conf.py file:

label_redirects = {
    "old-label": "new-label"
}

Alternatively, list the label redirects in a separate file, formatted as valid JSON:

label_redirects = "labels.json"

Project setup

reLabel is published on PyPI and can be installed with:

pip install sphinx-relabel

After adding reLabel to your Python project, update your Sphinx's conf.py file to include reLabel as one of its extensions:

extensions = [
    "sphinx_relabel"
]

Community and support

You can report any issues or bugs on the project's GitHub repository.

If you're interested in contributing to reLabel, start with the contribution guide.

License and copyright

reLabel is released under the GPL-3.0 license.

About

Redirect removed labels in your Sphinx docs.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published