{"library":"sphinxext-rediraffe","title":"Sphinx Redirect Extension","type":"library","description":"sphinxext-rediraffe is a Sphinx extension that generates HTTP redirects (via HTML meta refresh tags) for non-existent pages, pointing them to specified working pages. This is useful for maintaining SEO and user experience when restructuring documentation. It is currently at version 0.3.0 and typically releases updates as needed for bug fixes, compatibility with new Sphinx versions, or minor features.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install sphinxext-rediraffe"],"cli":null},"imports":["extensions = ['sphinxext.rediraffe']"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/sphinx-doc/sphinxext-rediraffe","docs":"https://sphinxext-rediraffe.readthedocs.io/","changelog":null,"pypi":"https://pypi.org/project/sphinxext-rediraffe/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"# conf.py\nextensions = [\n    'sphinxext.rediraffe',\n]\n\n# Option 1: Path to a text file with redirects (preferred for many redirects)\nrediraffe_redirects = \"redirects.txt\"\n\n# Option 2: A dictionary mapping old paths to new paths (for fewer redirects)\n# rediraffe_redirects = {\n#     \"old/page\": \"new/page.html\",\n#     \"legacy_docs/index\": \"current_docs/welcome.html\",\n# }\n\n# --- redirects.txt (example content, place in your source directory) ---\n# old/path/to/file new/path/to/target.html\n# old_directory/some_page new_directory/another_page.html\n# old/index new/home.html\n# A comment line starts with a hash\n","lang":"python","description":"To quickly set up `sphinxext-rediraffe`, first add it to your `extensions` list in `conf.py`. Then, configure the `rediraffe_redirects` setting, either by pointing it to a text file (e.g., `redirects.txt`) where each line specifies an old path followed by a new path, or by providing a dictionary directly in `conf.py`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}