=======================
sphinxcontrib-redirects
=======================
This contrib extension, `sphinxcontrib.redirects`, provides a Sphinx extension
for generating JavaScript-driven redirects for moved pages. It currently only
supports the `html` builder (``sphinx.builders.html.SingleFileHTMLBuilder``).
.. note::
The `sphinxext-rediraffe <https://pypi.org/project/sphinxext-rediraffe/>`__
extension appears to provide many more features than this package and
should probably be preferred for new projects.
Usage
-----
To enable the extension, you should add it to your ``conf.py`` file::
extensions = [
'sphinxcontrib.redirects',
...
]
The extension relies on a *redirect file*. This defaults to ``redirects``
within the source directory but it can be overridden. To override this value,
add the following to your ``conf.py`` file::
redirects_file = '<path to redirects file>'
The *redirect file* is a simple space-separated file of ``old_path`` -
``new_path`` pairs. These paths are relative to the source directory and should
include their extension. For example, if you renamed the file ``test.rst`` to
``testing.rst`` then you could write::
test.rst testing.rst
This works for files moved between directories too. If you moved a ``test.rst``
to ``testing/index.rst`` instead, then you could write::
test.rst testing/index.rst
For examples, refer to the samples used in the `tests
<tests/roots>`__.
Contributing
------------
For information on contributing, refer to the `contributing guide
<CONTRIBUTING.rst>`__.
Raw data
{
"_id": null,
"home_page": "https://github.com/sphinx-contrib/sphinxcontrib-redirects",
"name": "sphinxcontrib-redirects",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "sphinx",
"author": "Stephen Finucane",
"author_email": "stephen@that.guru",
"download_url": "https://files.pythonhosted.org/packages/4f/35/7a00e96f18b4037e7d4e7678e612feda6e1670de9c0f510f13e81ff39fb2/sphinxcontrib_redirects-0.2.0.tar.gz",
"platform": null,
"description": "=======================\nsphinxcontrib-redirects\n=======================\n\nThis contrib extension, `sphinxcontrib.redirects`, provides a Sphinx extension\nfor generating JavaScript-driven redirects for moved pages. It currently only\nsupports the `html` builder (``sphinx.builders.html.SingleFileHTMLBuilder``).\n\n.. note::\n\n The `sphinxext-rediraffe <https://pypi.org/project/sphinxext-rediraffe/>`__\n extension appears to provide many more features than this package and\n should probably be preferred for new projects.\n\nUsage\n-----\n\nTo enable the extension, you should add it to your ``conf.py`` file::\n\n extensions = [\n 'sphinxcontrib.redirects',\n ...\n ]\n\nThe extension relies on a *redirect file*. This defaults to ``redirects``\nwithin the source directory but it can be overridden. To override this value,\nadd the following to your ``conf.py`` file::\n\n redirects_file = '<path to redirects file>'\n\nThe *redirect file* is a simple space-separated file of ``old_path`` -\n``new_path`` pairs. These paths are relative to the source directory and should\ninclude their extension. For example, if you renamed the file ``test.rst`` to\n``testing.rst`` then you could write::\n\n test.rst testing.rst\n\nThis works for files moved between directories too. If you moved a ``test.rst``\nto ``testing/index.rst`` instead, then you could write::\n\n test.rst testing/index.rst\n\nFor examples, refer to the samples used in the `tests\n<tests/roots>`__.\n\nContributing\n------------\n\nFor information on contributing, refer to the `contributing guide\n<CONTRIBUTING.rst>`__.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Sphinx extension to generate JavaScript-driven redirects for moved pages",
"version": "0.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/sphinx-contrib/redirects/issues",
"Homepage": "https://github.com/sphinx-contrib/sphinxcontrib-redirects",
"Source Code": "https://github.com/sphinx-contrib/redirects"
},
"split_keywords": [
"sphinx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a4a804cd4501d5da44a4acf55d9a54d034b08953e42d7f2b1a38bd73057ced5d",
"md5": "6db826af7587c52fde6f2c4577422cff",
"sha256": "7b831d29d9f58c97d3050a3e98d1cf56aa87a4e7bfded01fe83e1caf4c32cf5a"
},
"downloads": -1,
"filename": "sphinxcontrib_redirects-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6db826af7587c52fde6f2c4577422cff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 5635,
"upload_time": "2024-10-08T17:09:07",
"upload_time_iso_8601": "2024-10-08T17:09:07.235936Z",
"url": "https://files.pythonhosted.org/packages/a4/a8/04cd4501d5da44a4acf55d9a54d034b08953e42d7f2b1a38bd73057ced5d/sphinxcontrib_redirects-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4f357a00e96f18b4037e7d4e7678e612feda6e1670de9c0f510f13e81ff39fb2",
"md5": "08dbf9057510ab80fc6646d7642376a0",
"sha256": "51d407865c296a1b076a63f62be8a5e88ecf70a96cad6f8240814fdafd30c4b9"
},
"downloads": -1,
"filename": "sphinxcontrib_redirects-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "08dbf9057510ab80fc6646d7642376a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 7283,
"upload_time": "2024-10-08T17:09:08",
"upload_time_iso_8601": "2024-10-08T17:09:08.194445Z",
"url": "https://files.pythonhosted.org/packages/4f/35/7a00e96f18b4037e7d4e7678e612feda6e1670de9c0f510f13e81ff39fb2/sphinxcontrib_redirects-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 17:09:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sphinx-contrib",
"github_project": "sphinxcontrib-redirects",
"github_not_found": true,
"lcname": "sphinxcontrib-redirects"
}