diff --git a/autoapi/templates/python/module.rst b/autoapi/templates/python/module.rst index e9b1490..3b53929 100644 --- a/autoapi/templates/python/module.rst +++ b/autoapi/templates/python/module.rst @@ -1,8 +1,12 @@ +{% if obj.docstring or obj.children %} + {{ obj.name }} {{ "=" * obj.name|length }} .. py:module:: {{ obj.name }} +{% endif %} + {%- if obj.docstring %} .. autoapi-nested-parse::