Skip to content

Commit

Permalink
Merge pull request #11 from eli-collins/master
Browse files Browse the repository at this point in the history
Add check for toctree function, needed for json builder compatibility
  • Loading branch information
electrofelix committed Apr 6, 2017
2 parents 79eb741 + c75f9fd commit d37efc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sphinxcontrib/fulltoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def html_page_context(app, pagename, templatename, context, doctree):
context['toc'] = rendered_toc
context['display_toc'] = True # force toctree to display

if "toctree" not in context:
# json builder doesn't use toctree func, so nothing to replace
return
def make_toctree(collapse=True):
return get_rendered_toctree(app.builder,
pagename,
Expand Down

0 comments on commit d37efc6

Please sign in to comment.