Skip to content

Commit 8a76bc8

Browse files
authored
BUG: fixing toctree of single-page case (#119)
1 parent 3ad5ddd commit 8a76bc8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pydata_sphinx_theme/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def get_nav_object(maxdepth=None, collapse=True, **kwargs):
4141
toctree = TocTree(app.env).get_toctree_for(
4242
pagename, app.builder, collapse=collapse, maxdepth=maxdepth, **kwargs
4343
)
44+
# If no toctree is defined (AKA a single-page site), skip this
45+
if toctree is None:
46+
return []
4447

4548
# toctree has this structure
4649
# <caption>

0 commit comments

Comments
 (0)