Skip to content

Commit 8d80e17

Browse files
committed
Restore original template structure with rubrics
This restores the original template formatting where Methods and Attributes are organized under rubric headings (which don't appear in TOC). Note: pydata-sphinx-theme's secondary sidebar only shows document headings, not autodoc entries. Methods/attributes won't appear in the sidebar without using actual section headings, which would add extra headers to the main body.
1 parent 75c68e3 commit 8d80e17

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

  • cuda_core/docs/source/_templates/autosummary

cuda_core/docs/source/_templates/autosummary/cyclass.rst

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,24 @@
66
.. currentmodule:: {{ module }}
77

88
.. autoclass:: {{ objname }}
9-
:members:
10-
:undoc-members:
11-
:inherited-members:
12-
:show-inheritance:
9+
10+
{% block methods %}
11+
{% if methods %}
12+
.. rubric:: {{ _('Methods') }}
13+
14+
{% for item in methods %}
15+
.. automethod:: {{ item }}
16+
{%- endfor %}
17+
18+
{% endif %}
19+
{% endblock %}
20+
21+
{% block attributes %}
22+
{% if attributes %}
23+
.. rubric:: {{ _('Attributes') }}
24+
25+
{% for item in attributes %}
26+
.. autoattribute:: {{ item }}
27+
{%- endfor %}
28+
{% endif %}
29+
{% endblock %}

0 commit comments

Comments
 (0)