Skip to content

Commit b30b665

Browse files
authored
Conditionally disabled custom 404 pages on dev docs (#11596)
This is for testing error pages more in production and can be reverted later.
1 parent b725eb4 commit b30b665

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"hoverxref.extension",
2222
"multiproject",
2323
"myst_parser",
24-
"notfound.extension",
24+
# For testing, conditionally disable the custom 404 pages on dev docs
25+
# "notfound.extension",
2526
"sphinx_copybutton",
2627
"sphinx_design",
2728
"sphinx_tabs.tabs",
@@ -55,6 +56,10 @@
5556

5657
docset = get_project(multiproject_projects)
5758

59+
# Disable custom 404 on dev docs
60+
if docset == "user":
61+
extensions.append("notfound.extension")
62+
5863
ogp_site_name = "Read the Docs Documentation"
5964
ogp_use_first_image = True # https://github.com/readthedocs/blog/pull/118
6065
ogp_image = "https://docs.readthedocs.io/en/latest/_static/img/logo-opengraph.png"

0 commit comments

Comments
 (0)