From fa2674fd1c1afdeea2f427c848fdb0f9ff3104a9 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Date: Wed, 23 Oct 2024 11:52:17 +0200 Subject: [PATCH] fix: ensure path object in fuse_search.py --- src/ansys_sphinx_theme/search/fuse_search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ansys_sphinx_theme/search/fuse_search.py b/src/ansys_sphinx_theme/search/fuse_search.py index c7b354571..37176d6bc 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.resolve().absolute()) / "_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)