Skip to content

Commit 91ddde4

Browse files
authored
Doc: Show object descriptions in the table of contents (#125757)
1 parent 759a54d commit 91ddde4

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
@@ -434,5 +434,6 @@ def setup(app):
434434
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
435435
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
436436
app.add_directive('miscnews', MiscNews)
437+
app.add_css_file('sidebar-wrap.css')
437438
app.connect('env-check-consistency', patch_pairindextypes)
438439
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)