From c49fd7888a0408b35a9a7a76560d52dab4065d01 Mon Sep 17 00:00:00 2001 From: Nuno do Carmo Date: Mon, 22 Jul 2024 15:29:16 +0200 Subject: [PATCH] Added redirect plugin The Docusaurus client redirect plugin was added to the configuration. In addition to the plugin, the redirect from `customizing` to `custom-install` pages (both on current and next) have been created. Signed-off-by: Nuno do Carmo nuno.carmo@suse.com --- docusaurus.config.js | 20 +++++++++++++++++++- package.json | 2 +- yarn.lock | 12 ++++++++++-- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index ac8746c23..2f6605e09 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -26,7 +26,25 @@ const config = { locales: ['en'], }, - presets: [ + plugins: [ + [ + '@docusaurus/plugin-client-redirects', + { + redirects: [ + { + to: '/custom-install', + from: '/customizing', + }, + { + to: '/next/custom-install', + from: '/next/customizing', + }, + ], + }, + ], + ], + + presets: [ [ 'classic', /** @type {import('@docusaurus/preset-classic').Options} */ diff --git a/package.json b/package.json index 240c461ac..3cb6e3dcd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "dependencies": { "@algolia/client-search": "^4.22.1", "@docusaurus/core": "^3.1.1", - "@docusaurus/plugin-client-redirects": "^3.1.1", + "@docusaurus/plugin-client-redirects": "3.1.1", "@docusaurus/plugin-google-gtag": "^3.1.1", "@docusaurus/preset-classic": "^3.1.1", "@mdx-js/react": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 26b5ff879..fc5640f8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1349,7 +1349,7 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@5.5.2" -"@docusaurus/plugin-client-redirects@^3.1.1": +"@docusaurus/plugin-client-redirects@3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.1.1.tgz#73feb15c2f3fe292d618f8a81e5194142f982ddb" integrity sha512-J/1Z75XkO+BmUXHW17FrCIYZQ3b0IKaJECH6yCxW5RQ8NMMJ+SZCtPtx5oYoAd0VHersNiUu+ZAxfOqbsn1jKQ== @@ -1499,7 +1499,7 @@ "@docusaurus/theme-search-algolia" "3.1.1" "@docusaurus/types" "3.1.1" -"@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": +"@docusaurus/react-loadable@5.5.2": version "5.5.2" resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz#81aae0db81ecafbdaee3651f12804580868fa6ce" integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== @@ -6931,6 +6931,14 @@ react-loadable@^5.5.0: dependencies: prop-types "^15.5.0" +"react-loadable@npm:@docusaurus/react-loadable@5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz#81aae0db81ecafbdaee3651f12804580868fa6ce" + integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== + dependencies: + "@types/react" "*" + prop-types "^15.6.2" + react-router-config@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/react-router-config/-/react-router-config-5.1.1.tgz#0f4263d1a80c6b2dc7b9c1902c9526478194a988"