Skip to content

Commit

Permalink
Format mkdocs search index in place (#3890)
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Aug 18, 2024
1 parent 9ef4695 commit 4c47d22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ fi
# Prettify `search_index.json` after `mkdocs`
# `mkdocs` removed its own prettify few years ago: https://github.com/mkdocs/mkdocs/pull/1128
if type python3 >/dev/null 2>/dev/null; then
python3 -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json
python3 -m json.tool --sort-keys --no-indent ./site/search/search_index.json ./site/search/search_index.json
else
python -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json
python -m json.tool --sort-keys --no-indent ./site/search/search_index.json ./site/search/search_index.json
fi
mv -f -- ./site/search/search_index_new.json ./site/search/search_index.json

0 comments on commit 4c47d22

Please sign in to comment.