Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions extensions/sphinx_inline_tabs/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,36 @@ def doctree_read(app: Sphinx, doctree: nodes.document):
break

if has_toctree:
# SAFE APPROACH: For now, preserve left navigation completely
# This means workflow-automation.rst won't get right-pane tab labels
# but left navigation will work correctly
pass # Keep original structure unchanged
# Merge tab headings into the existing right-pane TOC while preserving
# the original toctree (left navigation) structure.
try:
# Find the bullet list in the original toc item (holds section entries)
original_bullets = None
for child in getattr(original_toc_item, "children", []) or []:
if isinstance(child, nodes.bullet_list):
original_bullets = child
break

# Find the bullet list produced by our updated tab-aware TOC
updated_bullets = None
for child in getattr(updated_tocs, "children", []) or []:
if isinstance(child, nodes.bullet_list):
updated_bullets = child
break

# If we have tab headings to merge
if updated_bullets is not None:
if original_bullets is None:
# No existing bullets: attach updated list directly
original_toc_item.append(updated_bullets)
else:
# Append each new tab heading item to existing bullets
for li in list(updated_bullets.children):
original_bullets.append(li)
except Exception as e:
logger.warning(
f"{LOG_PREFIX} doctree_read({app.env.docname}): failed merging tab headings into TOC: {e}"
)
else:
# Only apply tab modifications if no toctree nodes are present
app.env.tocs[app.env.docname][0][1] = updated_tocs
Expand Down
58 changes: 0 additions & 58 deletions source/administration-guide/configure/config-proxy-apache2.rst

This file was deleted.

Loading