From 1f502bc79012b198aa77c8b01c296c44ddfb6b3e Mon Sep 17 00:00:00 2001 From: Revathy Venugopal <104772255+Revathyvenugopal162@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:14:28 +0200 Subject: [PATCH] fix: links redirect to search `js` for the landing page (#536) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jorge Martínez <28702884+jorgepiloto@users.noreply.github.com> --- doc-deploy-dev/action.yml | 2 ++ doc-deploy-stable/action.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/doc-deploy-dev/action.yml b/doc-deploy-dev/action.yml index d29a5dbda..876f16f06 100644 --- a/doc-deploy-dev/action.yml +++ b/doc-deploy-dev/action.yml @@ -279,11 +279,13 @@ runs: sed -i 's/href="\([^:"]*\)"/href="version\/stable\/\1"/g' index.html 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 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/stable/_static/js/meilisearch_theme_wrap.js"|g' index.html else echo "Error: The 'index.html' file does not exist." >&2 exit 1 diff --git a/doc-deploy-stable/action.yml b/doc-deploy-stable/action.yml index 2aa239dab..183378d53 100644 --- a/doc-deploy-stable/action.yml +++ b/doc-deploy-stable/action.yml @@ -447,11 +447,13 @@ runs: sed -i 's/href="\([^:"]*\)"/href="version\/stable\/\1"/g' index.html 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 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/stable/_static/js/meilisearch_theme_wrap.js"|g' index.html else echo "Error: The 'index.html' file does not exist." >&2 exit 1