Skip to content

Commit

Permalink
fix: redirect for search.json file (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 authored and jorgepiloto committed Oct 15, 2024
1 parent 5cda135 commit 26c269b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc-deploy-dev/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ runs:
sed -i 's/src="\([^:"]*\)"/src="version\/stable\/\1"/g' index.html
sed -i 's/action="search.html"/action="version\/stable\/search.html"/g' index.html
sed -i 's|script\.src = ".*_static/js/meilisearch_theme_wrap\.js"|script.src = "version/stable/_static/js/meilisearch_theme_wrap.js"|g' index.html
sed -i 's|var searchPath = ".*_static/search.json";|var searchPath = "version/stable/_static/search.json";|g' index.html
sed -i 's|var SEARCH_FILE = ".*_static/search.json";|var SEARCH_FILE = "version/stable/_static/search.json";|g' index.html
sed -i 's|<html lang="en" data-content_root="./" >|<html lang="en" data-content_root="./version/stable/" >|g' index.html
elif [[ -f 'version/dev/index.html' ]]; then
cp version/dev/index.html index.html
sed -i 's/href="\([^:"]*\)"/href="version\/dev\/\1"/g' index.html
sed -i 's/src="\([^:"]*\)"/src="version\/dev\/\1"/g' index.html
sed -i 's/action="search.html"/action="version\/dev\/search.html"/g' index.html
sed -i 's|script\.src = ".*_static/js/meilisearch_theme_wrap\.js"|script.src = "version/dev/_static/js/meilisearch_theme_wrap.js"|g' index.html
sed -i 's|var searchPath = ".*_static/search.json";|var searchPath = "version/dev/_static/search.json";|g' index.html
sed -i 's|var SEARCH_FILE = ".*_static/search.json";|var SEARCH_FILE = "version/dev/_static/search.json";|g' index.html
sed -i 's|<html lang="en" data-content_root="./" >|<html lang="en" data-content_root="./version/dev/" >|g' index.html
else
echo "Error: The 'index.html' file does not exist." >&2
Expand Down
2 changes: 1 addition & 1 deletion doc-deploy-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ runs:
sed -i 's/src="\([^:"]*\)"/src="version\/stable\/\1"/g' index.html
sed -i 's/action="search.html"/action="version\/stable\/search.html"/g' index.html
sed -i 's|script\.src = ".*_static/js/meilisearch_theme_wrap\.js"|script.src = "version/stable/_static/js/meilisearch_theme_wrap.js"|g' index.html
sed -i 's|var searchPath = ".*_static/search.json";|var searchPath = "version/stable/_static/search.json";|g' index.html
sed -i 's|var SEARCH_FILE = ".*_static/search.json";|var SEARCH_FILE = "version/stable/_static/search.json";|g' index.html
sed -i 's|<html lang="en" data-content_root="./" >|<html lang="en" data-content_root="./version/stable/" >|g' index.html
else
echo "Error: The 'index.html' file does not exist." >&2
Expand Down

0 comments on commit 26c269b

Please sign in to comment.