diff --git a/sphinx_book_theme/launch.py b/sphinx_book_theme/launch.py index 95bde950..7cec0b06 100644 --- a/sphinx_book_theme/launch.py +++ b/sphinx_book_theme/launch.py @@ -47,7 +47,7 @@ def add_hub_urls( # Figure out the folders we want build_dir = Path(app.outdir).parent ntbk_dir = build_dir.joinpath("jupyter_execute") - sources_dir = build_dir.joinpath("html", "_sources") + sources_dir = build_dir.joinpath(context.get("builder", "html"), "_sources") # Paths to old and new notebooks path_ntbk = ntbk_dir.joinpath(pagename).with_suffix(".ipynb") path_new_notebook = sources_dir.joinpath(pagename).with_suffix(".ipynb")