Skip to content

Commit

Permalink
fix: ensure app.builder.outdir is a Path object (#565)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
  • Loading branch information
jorgepiloto and pyansys-ci-bot authored Oct 23, 2024
1 parent 201e4aa commit d5ced49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changelog.d/565.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: ensure app.builder.outdir is a Path object
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) / "_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 d5ced49

Please sign in to comment.