Added custom 404 error code page in the sphinx docs (#115)

This commit is contained in:
Philipp Horstenkamp 2023-09-13 19:01:09 +02:00 committed by GitHub
parent ba44b082b8
commit 507647d164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 26 deletions

View File

@ -43,6 +43,7 @@ extensions: Final[list[str]] = [
"sphinx.ext.viewcode", "sphinx.ext.viewcode",
"IPython.sphinxext.ipython_console_highlighting", "IPython.sphinxext.ipython_console_highlighting",
"sphinxcontrib.mermaid", "sphinxcontrib.mermaid",
"notfound.extension",
] ]
# templates_path : Final[list[str]] = ["_templates"] # templates_path : Final[list[str]] = ["_templates"]
@ -86,3 +87,5 @@ intersphinx_mapping: Final[dict[str, tuple[str, None]]] = {
"scikit-learn": ("https://scikit-learn.org/stable/", None), "scikit-learn": ("https://scikit-learn.org/stable/", None),
"sphinx": ("https://docs.sympy.org/latest/", None), "sphinx": ("https://docs.sympy.org/latest/", None),
} }
notfound_urls_prefix = "/"

49
poetry.lock generated
View File

@ -3366,26 +3366,6 @@ files = [
[package.dependencies] [package.dependencies]
ptyprocess = ">=0.5" ptyprocess = ">=0.5"
[[package]]
name = "pgeocode"
version = "0.4.1"
description = "Approximate geocoding"
category = "main"
optional = false
python-versions = ">=3.8"
files = [
{file = "pgeocode-0.4.1-py3-none-any.whl", hash = "sha256:0cc3916d75c41ffcd910ccc2252235a66c627346502cba5d2e97b6ea0aa83257"},
{file = "pgeocode-0.4.1.tar.gz", hash = "sha256:08f35dedf79957769641c7137aa9cc189e1bb63033226372dce372b14973e8b2"},
]
[package.dependencies]
numpy = "*"
pandas = "*"
requests = "*"
[package.extras]
fuzzy = ["thefuzz"]
[[package]] [[package]]
name = "pickleshare" name = "pickleshare"
version = "0.7.5" version = "0.7.5"
@ -4914,20 +4894,20 @@ win32 = ["pywin32"]
[[package]] [[package]]
name = "setuptools" name = "setuptools"
version = "68.2.0" version = "68.2.1"
description = "Easily download, build, install, upgrade, and uninstall Python packages" description = "Easily download, build, install, upgrade, and uninstall Python packages"
category = "main" category = "main"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
{file = "setuptools-68.2.0-py3-none-any.whl", hash = "sha256:af3d5949030c3f493f550876b2fd1dd5ec66689c4ee5d5344f009746f71fd5a8"}, {file = "setuptools-68.2.1-py3-none-any.whl", hash = "sha256:eff96148eb336377ab11beee0c73ed84f1709a40c0b870298b0d058828761bae"},
{file = "setuptools-68.2.0.tar.gz", hash = "sha256:00478ca80aeebeecb2f288d3206b0de568df5cd2b8fada1209843cc9a8d88a48"}, {file = "setuptools-68.2.1.tar.gz", hash = "sha256:56ee14884fd8d0cd015411f4a13f40b4356775a0aefd9ebc1d3bfb9a1acb32f1"},
] ]
[package.extras] [package.extras]
docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"]
[[package]] [[package]]
name = "shapely" name = "shapely"
@ -5131,6 +5111,25 @@ sphinx = ">=1.8"
code-style = ["pre-commit (==2.12.1)"] code-style = ["pre-commit (==2.12.1)"]
rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"]
[[package]]
name = "sphinx-notfound-page"
version = "1.0.0"
description = "Sphinx extension to build a 404 page with absolute URLs"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
{file = "sphinx_notfound_page-1.0.0-py3-none-any.whl", hash = "sha256:40a5741a6b07245a08fe55dbbd603ad6719e191b1419ab2e5337c706ebd16554"},
{file = "sphinx_notfound_page-1.0.0.tar.gz", hash = "sha256:14cd388956de5cdf8710ab4ff31776ef8d85759c4f46014ee30f368e83bd3a3b"},
]
[package.dependencies]
sphinx = ">=5"
[package.extras]
doc = ["sphinx-autoapi", "sphinx-rtd-theme", "sphinx-tabs", "sphinxemoji"]
test = ["tox"]
[[package]] [[package]]
name = "sphinx-rtd-theme" name = "sphinx-rtd-theme"
version = "1.3.0" version = "1.3.0"
@ -5914,4 +5913,4 @@ ingest = ["selenium"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.11" python-versions = "^3.11"
content-hash = "f15e3b3171f0b6b22635f5c9de7635114c99447c5b3d41f8b1596d005fe1dce8" content-hash = "8bb7730a3c0b9881f7d4cdadff6d1edadfec8e4244be0c530f072bd8ea17dc15"

View File

@ -42,7 +42,6 @@ dash-bootstrap-components = "^1.5.0"
deutschland = {git = "https://github.com/TrisNol/deutschland.git", branch = "hotfix/python-3.11-support"} deutschland = {git = "https://github.com/TrisNol/deutschland.git", branch = "hotfix/python-3.11-support"}
loguru = "^0.7.0" loguru = "^0.7.0"
matplotlib = "^3.7.2" matplotlib = "^3.7.2"
pgeocode = "^0.4.0"
plotly = "^5.16.1" plotly = "^5.16.1"
psycopg2-binary = "^2.9.7" psycopg2-binary = "^2.9.7"
pymongo = "^4.5.0" pymongo = "^4.5.0"
@ -69,6 +68,7 @@ myst-parser = "^1.0.0"
nbsphinx = "^0.9.2" nbsphinx = "^0.9.2"
sphinx = "*" sphinx = "*"
sphinx-copybutton = "^0.5.2" sphinx-copybutton = "^0.5.2"
sphinx-notfound-page = "^1.0.0"
sphinx-rtd-theme = "^1.3.0" sphinx-rtd-theme = "^1.3.0"
sphinx_autodoc_typehints = "*" sphinx_autodoc_typehints = "*"
sphinxcontrib-mermaid = "^0.9.2" sphinxcontrib-mermaid = "^0.9.2"