|
|
@ -128,7 +128,12 @@ def doctree_read(app, doctree):
|
|
|
|
insert = True
|
|
|
|
insert = True
|
|
|
|
nodes = doctree.traverse(toctree)
|
|
|
|
nodes = doctree.traverse(toctree)
|
|
|
|
toc_entry = "%s/index" % app.config.autoapi_root
|
|
|
|
toc_entry = "%s/index" % app.config.autoapi_root
|
|
|
|
if not nodes:
|
|
|
|
add_entry = (
|
|
|
|
|
|
|
|
nodes
|
|
|
|
|
|
|
|
and app.config.autoapi_generate_api_docs
|
|
|
|
|
|
|
|
and app.config.autoapi_add_toctree_entry
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
if not add_entry:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
# Capture all existing toctree entries
|
|
|
|
# Capture all existing toctree entries
|
|
|
|
for node in nodes:
|
|
|
|
for node in nodes:
|
|
|
|