Skip to content

Commit 98a0b36

Browse files
[3.12] Doc: Show object descriptions in the table of contents (GH-125757) (#125841)
(cherry picked from commit 91ddde4) Co-authored-by: Adam Turner <[email protected]>
1 parent 7a2bd3d commit 98a0b36

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686

8787
# Create table of contents entries for domain objects (e.g. functions, classes,
8888
# attributes, etc.). Default is True.
89-
toc_object_entries = False
89+
toc_object_entries = True
90+
toc_object_entries_show_parents = 'hide'
9091

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

Doc/tools/extensions/pyspecific.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,5 +412,6 @@ def setup(app):
412412
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
413413
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
414414
app.add_directive('miscnews', MiscNews)
415+
app.add_css_file('sidebar-wrap.css')
415416
app.connect('env-check-consistency', patch_pairindextypes)
416417
return {'version': '1.0', 'parallel_read_safe': True}

Doc/tools/static/sidebar-wrap.css

Lines changed: 6 additions & 0 deletions
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)