diff --git a/sphinx_external_toc/events.py b/sphinx_external_toc/events.py index dc57ea1..aa78fd6 100644 --- a/sphinx_external_toc/events.py +++ b/sphinx_external_toc/events.py @@ -333,6 +333,8 @@ def ensure_index_file(app: Sphinx, exception: Optional[Exception]) -> None: redirect_url = f"{root_name}.html" elif app.builder.name == "dirhtml": redirect_url = f"{root_name}/index.html" + else: + return redirect_text = f'\n' index_path.write_text(redirect_text, encoding="utf8")