From 22c13257050a4139972db0a08078ed7dbc466168 Mon Sep 17 00:00:00 2001 From: Danishk2445 <143554875+Danishk2445@users.noreply.github.com> Date: Sat, 26 Sep 2026 13:51:22 -0500 Subject: [PATCH] gh-57491: Reduce the EPUB table of contents depth to 2 (GH-158105) (cherry picked from commit 5eb4ab5a91d5ded26ab6c2e58667bfb2f5ade249) Co-authored-by: Danishk2445 <143554875+Danishk2445@users.noreply.github.com> --- Doc/conf.py | 4 ++++ .../2026-09-24-10-10-15.gh-issue-57491.UA-2uN.rst | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2026-09-24-10-10-15.gh-issue-57491.UA-2uN.rst diff --git a/Doc/conf.py b/Doc/conf.py index 9bbe94c4781fc9e..60219f48a5967bd 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -471,6 +471,10 @@ # https://github.com/sphinx-doc/sphinx/issues/12359 epub_use_index = False +# The default depth of 3 lists over a thousand entries, which makes the +# table of contents hard to navigate in e-book readers +epub_tocdepth = 2 + # translation tag # --------------- diff --git a/Misc/NEWS.d/next/Documentation/2026-09-24-10-10-15.gh-issue-57491.UA-2uN.rst b/Misc/NEWS.d/next/Documentation/2026-09-24-10-10-15.gh-issue-57491.UA-2uN.rst new file mode 100644 index 000000000000000..c7c8057776bec4a --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2026-09-24-10-10-15.gh-issue-57491.UA-2uN.rst @@ -0,0 +1,3 @@ +Reduce the depth of the table of contents in the EPUB documentation from +three levels to two, making it much shorter and easier to navigate in e-book +readers.