Skip to content

Commit 93c7c01

Browse files
Update __init__.py
1 parent fd4b7dc commit 93c7c01

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sphinx_external_toc/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ def setup(app: "Sphinx") -> dict:
3131
# variables
3232
app.add_config_value("external_toc_path", "_toc.yml", "env")
3333
app.add_config_value("external_toc_exclude_missing", False, "env")
34+
35+
# Register use_multitoc_numbering if not already registered (e.g., by JupyterBook)
36+
try:
37+
app.add_config_value("use_multitoc_numbering", True, "env")
38+
except Exception:
39+
# Already registered, likely by JupyterBook
40+
pass
3441

3542
# Note: this needs to occur after merge_source_suffix event (priority 800)
3643
# this cannot be a builder-inited event, since if we change the master_doc

0 commit comments

Comments
 (0)