mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-19 15:25:31 +00:00
Fix noting the toctree
This commit is contained in:
parent
3181228616
commit
3875cf495d
@ -120,6 +120,7 @@ def doctree_read(app, doctree):
|
||||
if not nodes:
|
||||
return
|
||||
# Capture all existing toctree entries
|
||||
root = nodes[0]
|
||||
for node in nodes:
|
||||
for entry in node['entries']:
|
||||
all_docs.add(entry[1])
|
||||
@ -145,7 +146,7 @@ def doctree_read(app, doctree):
|
||||
darkgreen('Adding AutoAPI TOCTree [%s] to index.rst' % toc_entry)
|
||||
)
|
||||
if sphinx.version_info > (1, 5):
|
||||
app.env.toctree.process_doc(app.env.docname, doctree)
|
||||
app.env.note_toctree(app.env.docname, root)
|
||||
else:
|
||||
app.env.build_toc_from(app.env.docname, doctree)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user