From 57c7a82ad8fae6b2ec45af3fe277c00045227a06 Mon Sep 17 00:00:00 2001 From: Nemanja Boskovic Date: Mon, 19 Aug 2024 15:57:41 +0200 Subject: [PATCH] add custom 404 pointing to new docs --- doc/404.rst | 8 ++++++++ doc/conf.py | 2 +- poetry.lock | 22 ++++++++++++++++++++-- pyproject.toml | 1 + 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 doc/404.rst diff --git a/doc/404.rst b/doc/404.rst new file mode 100644 index 00000000..ed8e0bf5 --- /dev/null +++ b/doc/404.rst @@ -0,0 +1,8 @@ +:orphan: metadata + +################# +Page not found +################# + +This is the old documentation that will be removed in the future. Visit `new docs page `_ to keep reading. +API reference section is still available here. \ No newline at end of file diff --git a/doc/conf.py b/doc/conf.py index 89c2667c..dc3ebf86 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -17,9 +17,9 @@ "sphinx.ext.todo", "sphinx.ext.viewcode", "lowdown", + "notfound.extension" ] - # The suffix of source filenames. source_suffix = ".rst" diff --git a/poetry.lock b/poetry.lock index 575e11aa..1b003ea7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -1205,6 +1205,24 @@ docs = ["sphinxcontrib-websupport"] lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] +[[package]] +name = "sphinx-notfound-page" +version = "1.0.4" +description = "Sphinx extension to build a 404 page with absolute URLs" +optional = false +python-versions = ">=3.8" +files = [ + {file = "sphinx_notfound_page-1.0.4-py3-none-any.whl", hash = "sha256:f7c26ae0df3cf3d6f38f56b068762e6203d0ebb7e1c804de1059598d7dd8b9d8"}, + {file = "sphinx_notfound_page-1.0.4.tar.gz", hash = "sha256:2a52f49cd367b5c4e64072de1591cc367714098500abf4ecb9a3ecb4fec25aae"}, +] + +[package.dependencies] +sphinx = ">=5" + +[package.extras] +doc = ["sphinx-autoapi", "sphinx-rtd-theme", "sphinx-tabs", "sphinxemoji"] +test = ["tox"] + [[package]] name = "sphinx-rtd-theme" version = "2.0.0" @@ -1464,4 +1482,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "0d38d200cf62fa0c09b90693d3f862e262e56ef8f7fca56162f10d828628abc5" +content-hash = "cfcd14076e375482d503c20360ffa9bb4c5b6adeb41ad10abea8b2b99d10a7fd" diff --git a/pyproject.toml b/pyproject.toml index 885e142f..6a4d4b90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ pyparsing = ">=2.0,<3" clique = "==1.6.1" websocket-client = ">=0.40.0,<1" platformdirs = ">=4.0.0,<5" +sphinx-notfound-page = "^1.0.4" [tool.poetry.group.dev.dependencies] black = "^23.7.0"