From 5e831ed72190630a824fa9cf0781b40504fc4ae1 Mon Sep 17 00:00:00 2001 From: iam-agf <61362029+iam-agf@users.noreply.github.com> Date: Wed, 26 Jul 2023 05:17:41 -0600 Subject: [PATCH] fix(docs): update the "Upgrade is available" text (#3564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Reduces redirect to `#upgrade` as in #3225 * Solve Update the "Upgrade is available" text #3225 * Nightly case removed to a generalized redirect * Space title - #upgrade Co-authored-by: Jerónimo Albi * returning void instead of undefined Co-authored-by: Jerónimo Albi * Spacing v0.25.2 * Spacing 0.27.1 * Spacing 0.26.1 * Update ignite/cmd/cmd.go Co-authored-by: Maksym Hontar <99190705+max-hontar@users.noreply.github.com> --------- Co-authored-by: Danilo Pantani Co-authored-by: Jerónimo Albi Co-authored-by: Jerónimo Albi Co-authored-by: Maksym Hontar <99190705+max-hontar@users.noreply.github.com> --- docs/docs/01-welcome/02-install.md | 2 +- docs/docusaurus.config.js | 18 ++++++++++++------ .../version-v0.25.2/guide/01-install.md | 2 +- .../version-v0.26.1/01-welcome/02-install.md | 2 +- .../version-v0.27.1/01-welcome/02-install.md | 2 +- ignite/cmd/cmd.go | 9 +-------- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/docs/docs/01-welcome/02-install.md b/docs/docs/01-welcome/02-install.md index 87fe81fe61..9fa22fbb07 100644 --- a/docs/docs/01-welcome/02-install.md +++ b/docs/docs/01-welcome/02-install.md @@ -78,7 +78,7 @@ In this case, use sudo before `curl` and before `bash`: sudo curl https://get.ignite.com/cli | sudo bash ``` -## Upgrading your Ignite CLI installation +## Upgrading your Ignite CLI installation {#upgrade} Before you install a new version of Ignite CLI, remove all existing Ignite CLI installations. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index bad8ec2795..130084cbad 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -241,12 +241,18 @@ const config = { [ "@docusaurus/plugin-client-redirects", { - redirects: [ - { - from: "/nightly/guide/install", - to: "/nightly/welcome/install", - }, - ], + createRedirects(existingPath) { + if (existingPath.includes('/welcome')) { + /* + If the link received contains the path /guide, + this will change to /welcome. + */ + return [ + existingPath.replace('/welcome', '/guide'), + ]; + } + return; // No redirect created if it doesn't contain /guide + }, }, ], async function myPlugin(context, options) { diff --git a/docs/versioned_docs/version-v0.25.2/guide/01-install.md b/docs/versioned_docs/version-v0.25.2/guide/01-install.md index 76ccdac452..a329fd2424 100644 --- a/docs/versioned_docs/version-v0.25.2/guide/01-install.md +++ b/docs/versioned_docs/version-v0.25.2/guide/01-install.md @@ -74,7 +74,7 @@ In this case, use sudo before `curl` and before `bash`: sudo curl https://get.ignite.com/cli! | sudo bash ``` -## Upgrading your Ignite CLI installation +## Upgrading your Ignite CLI installation {#upgrade} Before you install a new version of Ignite CLI, remove all existing Ignite CLI installations. diff --git a/docs/versioned_docs/version-v0.26.1/01-welcome/02-install.md b/docs/versioned_docs/version-v0.26.1/01-welcome/02-install.md index 87fe81fe61..9fa22fbb07 100644 --- a/docs/versioned_docs/version-v0.26.1/01-welcome/02-install.md +++ b/docs/versioned_docs/version-v0.26.1/01-welcome/02-install.md @@ -78,7 +78,7 @@ In this case, use sudo before `curl` and before `bash`: sudo curl https://get.ignite.com/cli | sudo bash ``` -## Upgrading your Ignite CLI installation +## Upgrading your Ignite CLI installation {#upgrade} Before you install a new version of Ignite CLI, remove all existing Ignite CLI installations. diff --git a/docs/versioned_docs/version-v0.27.1/01-welcome/02-install.md b/docs/versioned_docs/version-v0.27.1/01-welcome/02-install.md index 87fe81fe61..9fa22fbb07 100644 --- a/docs/versioned_docs/version-v0.27.1/01-welcome/02-install.md +++ b/docs/versioned_docs/version-v0.27.1/01-welcome/02-install.md @@ -78,7 +78,7 @@ In this case, use sudo before `curl` and before `bash`: sudo curl https://get.ignite.com/cli | sudo bash ``` -## Upgrading your Ignite CLI installation +## Upgrading your Ignite CLI installation {#upgrade} Before you install a new version of Ignite CLI, remove all existing Ignite CLI installations. diff --git a/ignite/cmd/cmd.go b/ignite/cmd/cmd.go index 535877ac5e..311f8d5ea1 100644 --- a/ignite/cmd/cmd.go +++ b/ignite/cmd/cmd.go @@ -261,14 +261,7 @@ func checkNewVersion(ctx context.Context) { return } - fmt.Printf(`· -· 🛸 Ignite CLI %s is available! -· -· To upgrade your Ignite CLI version, see the upgrade doc: https://docs.ignite.com/welcome/install#upgrading-your-ignite-cli-installation -· -·· - -`, next) + fmt.Printf("⬆️ Ignite CLI %s is available! To upgrade: https://docs.ignite.com/welcome/install#upgrade", next) } func printSection(session *cliui.Session, title string) error {