summaryrefslogtreecommitdiff
path: root/doc/source/_templates
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-12-16 09:27:39 +0200
committerGitHub <noreply@github.com>2020-12-16 09:27:39 +0200
commitb19eaf1fdb277310e82defbfc82d6476c3845dfd (patch)
tree2dc3fe4a037d2c8db1af7a4e12686bbb07d46c40 /doc/source/_templates
parentc9f9081fd7156e351f7a30d8e3b75968cc5503c4 (diff)
parent05debfd0faf61552152d440676e0fb67041bf881 (diff)
downloadnumpy-b19eaf1fdb277310e82defbfc82d6476c3845dfd.tar.gz
Merge pull request #17637 from takanori-pskq/i13114-add-module-template
DOC: Add module template
Diffstat (limited to 'doc/source/_templates')
-rw-r--r--doc/source/_templates/autosummary/module.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/source/_templates/autosummary/module.rst b/doc/source/_templates/autosummary/module.rst
new file mode 100644
index 000000000..e1f428d65
--- /dev/null
+++ b/doc/source/_templates/autosummary/module.rst
@@ -0,0 +1,40 @@
+{% extends "!autosummary/module.rst" %}
+
+{# This file is almost the same as the default, but adds :toctree: to the autosummary directives.
+ The original can be found at `sphinx/ext/autosummary/templates/autosummary/module.rst`. #}
+
+{% block attributes %}
+{% if attributes %}
+ .. rubric:: Module Attributes
+
+ .. autosummary::
+ :toctree:
+ {% for item in attributes %}
+ {{ item }}
+ {%- endfor %}
+{% endif %}
+{% endblock %}
+
+{% block functions %}
+{% if functions %}
+ .. rubric:: Functions
+
+ .. autosummary::
+ :toctree:
+ {% for item in functions %}
+ {{ item }}
+ {%- endfor %}
+{% endif %}
+{% endblock %}
+
+{% block classes %}
+{% if classes %}
+ .. rubric:: Classes
+
+ .. autosummary::
+ :toctree:
+ {% for item in classes %}
+ {{ item }}
+ {%- endfor %}
+{% endif %}
+{% endblock %}