From bb28062f402d8595da5887801addd9b8ae3144a3 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Wed, 11 Sep 2024 09:58:03 -0700 Subject: [PATCH] Conditionally disabled custom 404 pages on dev docs This is for testing error pages more in production and can be reverted later. --- docs/conf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b1288c85360..aca1753a131 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,8 @@ "hoverxref.extension", "multiproject", "myst_parser", - "notfound.extension", + # For testing, conditionally disable the custom 404 pages on dev docs + # "notfound.extension", "sphinx_copybutton", "sphinx_design", "sphinx_tabs.tabs", @@ -55,6 +56,10 @@ docset = get_project(multiproject_projects) +# Disable custom 404 on dev docs +if docset == "user": + extensions.append("notfound.extension") + ogp_site_name = "Read the Docs Documentation" ogp_use_first_image = True # https://github.com/readthedocs/blog/pull/118 ogp_image = "https://docs.readthedocs.io/en/latest/_static/img/logo-opengraph.png"