From 96fba362f0e395dfe731bda1b65d167b4346a6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= Date: Wed, 8 May 2024 11:31:55 +0200 Subject: [PATCH] feat: custom 404 page --- requirements.txt | 1 + sources/conf.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/requirements.txt b/requirements.txt index 9485806..1df9690 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,6 @@ sphinx-contributors==0.2.7 sphinx-copybutton==0.5.2 # sphinx-design==0.5.0 sphinx-last-updated-by-git==0.3.7 +sphinx-notfound-page==1.0.0 sphinx-tabs==3.4.5 sphinx-togglebutton==0.3.2 diff --git a/sources/conf.py b/sources/conf.py index 62753ed..13785db 100644 --- a/sources/conf.py +++ b/sources/conf.py @@ -24,6 +24,7 @@ "sphinx.ext.todo", # "sphinx_design", "sphinx_last_updated_by_git", + "notfound.extension", "sphinx_tabs.tabs", "sphinx_togglebutton", ] @@ -85,3 +86,10 @@ # sphinx-last-updated-by-git git_last_updated_timezone = UTC html_last_updated_fmt = "%Y-%m-%d %H:%M:%S UTC" + +# sphinx-notfound-page +notfound_context = { + "title": "Elle est où la page ?", + "body": '

Elle est où la page ?

¯\\_(ツ)_/¯

La page en question ne semble pas, ou plus, exister.

', +} +notfound_urls_prefix = ""