Skip to content

Commit 926f808

Browse files
authored
Add 'toctree' option to autosummary directive to generate stub pages (#3927)
1 parent 7d12bae commit 926f808

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/_templates/autosummary/class.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.. rubric:: Methods Summary
1818

1919
.. autosummary::
20+
:toctree:
2021
{% for item in methods %}
2122
{% if item != '__init__' %}
2223
{{ objname }}.{{ item }}

doc/_templates/autosummary/module.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.. rubric:: Classes
1717

1818
.. autosummary::
19-
:toctree: ./
19+
:toctree:
2020
{% for item in classes %}
2121
{{ item }}
2222
{% endfor %}
@@ -29,7 +29,7 @@
2929
.. rubric:: Functions
3030

3131
.. autosummary::
32-
:toctree: ./
32+
:toctree:
3333
{% for item in functions %}
3434
{{ item }}
3535
{% endfor %}
@@ -42,7 +42,7 @@
4242
.. rubric:: Exceptions
4343

4444
.. autosummary::
45-
:toctree: ./
45+
:toctree:
4646
{% for item in exceptions %}
4747
{{ item }}
4848
{% endfor %}

0 commit comments

Comments
 (0)