Can turn off autoapisummary directives in output

pull/116/head
Ashley Whetter 7 years ago
parent 4adcdc5351
commit b792463cc9

@ -167,6 +167,7 @@ def setup(app):
app.add_config_value('autoapi_add_toctree_entry', True, 'html')
app.add_config_value('autoapi_add_api_root_toctree', False, 'html')
app.add_config_value('autoapi_template_dir', None, 'html')
app.add_config_value('autoapi_include_summaries', False, 'html')
app.add_stylesheet('autoapi.css')
directives.register_directive('autoapi-nested-parse', NestedParse)
directives.register_directive('autoapisummary', AutoapiSummary)

@ -290,7 +290,9 @@ class SphinxMapperBase(object):
def output_rst(self, root, source_suffix):
for id, obj in self.objects.items():
rst = obj.render()
rst = obj.render(
include_summaries=self.app.config.autoapi_include_summaries,
)
if not rst:
continue

@ -41,6 +41,7 @@ Submodules
{{ obj.type|title }} Contents
{{ "-" * obj.type|length }}---------
{% if include_summaries %}
{% block classes %}{% if obj.classes %}
Classes
~~~~~~~
@ -71,6 +72,7 @@ Functions
{{ function.id }}
{%- endfor %}
{% endif %}{% endblock %}
{% endif %}
{%- for obj_item in obj.children %}

@ -57,6 +57,12 @@ Customization Options
Relative path to output the AutoAPI files into
.. confval:: autoapi_include_summaries
Default: ``False``
Whether include autosummary directives in generated module documentation.
Debugging Options
-----------------

Loading…
Cancel
Save