diff --git a/doc/changelog.d/565.miscellaneous.md b/doc/changelog.d/565.miscellaneous.md new file mode 100644 index 00000000..1313047c --- /dev/null +++ b/doc/changelog.d/565.miscellaneous.md @@ -0,0 +1 @@ +fix: ensure app.builder.outdir is a Path object \ No newline at end of file diff --git a/src/ansys_sphinx_theme/search/fuse_search.py b/src/ansys_sphinx_theme/search/fuse_search.py index c7b35457..4e6539ac 100644 --- a/src/ansys_sphinx_theme/search/fuse_search.py +++ b/src/ansys_sphinx_theme/search/fuse_search.py @@ -23,6 +23,7 @@ """Module for generating search indices.""" import json +from pathlib import Path import re from docutils import nodes @@ -147,6 +148,6 @@ def create_search_index(app, exception): search_index.build_sections() search_index_list.extend(search_index.indices) - search_index_path = app.builder.outdir / "_static" / "search.json" + search_index_path = Path(app.builder.outdir) / "_static" / "search.json" with search_index_path.open("w", encoding="utf-8") as index_file: json.dump(search_index_list, index_file, ensure_ascii=False, indent=4)