Skip to content

Commit 22ae72b

Browse files
[3.13] Doc: Show object descriptions in the table of contents (GH-125757) (#125840)
(cherry picked from commit 91ddde4) Co-authored-by: Adam Turner <[email protected]>
1 parent 1fe63b1 commit 22ae72b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Doc/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@
9494

9595
# Create table of contents entries for domain objects (e.g. functions, classes,
9696
# attributes, etc.). Default is True.
97-
toc_object_entries = False
97+
toc_object_entries = True
98+
toc_object_entries_show_parents = 'hide'
9899

99100
# Ignore any .rst files in the includes/ directory;
100101
# they're embedded in pages but not rendered individually.

Doc/tools/extensions/pyspecific.py

+1
Original file line numberDiff line numberDiff line change
@@ -411,5 +411,6 @@ def setup(app):
411411
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
412412
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
413413
app.add_directive('miscnews', MiscNews)
414+
app.add_css_file('sidebar-wrap.css')
414415
app.connect('env-check-consistency', patch_pairindextypes)
415416
return {'version': '1.0', 'parallel_read_safe': True}

Doc/tools/static/sidebar-wrap.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
div.sphinxsidebarwrapper {
2+
overflow-x: scroll;
3+
}
4+
div.sphinxsidebarwrapper li code {
5+
overflow-wrap: normal;
6+
}

0 commit comments

Comments
 (0)