Skip to content

Commit c8ae56e

Browse files
committed
Handle orphaned API pages in sidebar
1 parent a98e4f0 commit c8ae56e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

docs/cugraph-docs/source/_templates/sidebar-nav-bs.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
That is correct for nested pages, where the sidebar should still show the
1111
active section and its foldable children. For top-level section landing
1212
pages, that output duplicates the primary navbar item in the sidebar, so we
13-
render only the active section's child <ul> on those landing pages.
13+
render only the active section's child <ul> on those landing pages. Orphaned
14+
autosummary pages have no navigation parent, so they cannot generate a
15+
section toctree and intentionally omit it.
1416
#}
1517
{% set show_nav_level = meta['html_theme.show_nav_level'] if (meta is defined and meta is not none and 'html_theme.show_nav_level' in meta) else theme_show_nav_level %}
1618
{% set special_page = pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %}
17-
{% if not special_page %}
19+
{% set has_navigation_parent = parents is defined and parents %}
20+
{% if not special_page and has_navigation_parent %}
1821
{% set nav_tree = generate_toctree_html(
1922
"sidebar",
2023
startdepth=1,

0 commit comments

Comments
 (0)