Skip to content

Commit

Permalink
fix: ensure path object in fuse_search.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgepiloto committed Oct 23, 2024
1 parent 201e4aa commit fa2674f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansys_sphinx_theme/search/fuse_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"""Module for generating search indices."""

import json
from pathlib import Path
import re

from docutils import nodes
Expand Down Expand Up @@ -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)

0 comments on commit fa2674f

Please sign in to comment.