From 404961a9ba590911dd4131fd2188a90d7327ba26 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Thu, 24 Aug 2023 13:05:44 -0700 Subject: [PATCH] Add redirect plugin --- docusaurus.config.js | 12 ++++++++++++ package-lock.json | 40 ++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 53 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index ab5f216dd..d6c5a274a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -216,6 +216,18 @@ const config = { disableInDev: false, }, ], + [ + "@docusaurus/plugin-client-redirects", + { + redirects: [ + // file renamed in https://github.com/unraid/docs/commit/570a7e629bef1577d43e188495cb71916e7de360 + { + to: "/legacy/FAQ/shrink-array/", + from: "/legacy/FAQ/Shrink_array/", + }, + ], + }, + ], ], }; diff --git a/package-lock.json b/package-lock.json index 48cde2117..911242a3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "@docusaurus/core": "2.4.1", + "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/plugin-ideal-image": "^2.4.1", "@docusaurus/preset-classic": "2.4.1", "@mdx-js/react": "^1.6.22", @@ -2203,6 +2204,29 @@ "react-dom": "*" } }, + "node_modules/@docusaurus/plugin-client-redirects": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.1.tgz", + "integrity": "sha512-tp0j16gaLIJ4p+IR0P6KDOFsTOGGMY54MNPnmM61Vaqqt5omLqsuKUO8UlCGU1oW/4EIQOhXYy99XYY5MjE+7A==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", + "eta": "^2.0.0", + "fs-extra": "^10.1.0", + "lodash": "^4.17.21", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, "node_modules/@docusaurus/plugin-content-blog": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.1.tgz", @@ -20074,6 +20098,22 @@ "react-loadable": "npm:@docusaurus/react-loadable@5.5.2" } }, + "@docusaurus/plugin-client-redirects": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.1.tgz", + "integrity": "sha512-tp0j16gaLIJ4p+IR0P6KDOFsTOGGMY54MNPnmM61Vaqqt5omLqsuKUO8UlCGU1oW/4EIQOhXYy99XYY5MjE+7A==", + "requires": { + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", + "eta": "^2.0.0", + "fs-extra": "^10.1.0", + "lodash": "^4.17.21", + "tslib": "^2.4.0" + } + }, "@docusaurus/plugin-content-blog": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.1.tgz", diff --git a/package.json b/package.json index 9ff126d5a..fbad77ef9 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "dependencies": { "@docusaurus/core": "2.4.1", + "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/plugin-ideal-image": "^2.4.1", "@docusaurus/preset-classic": "2.4.1", "@mdx-js/react": "^1.6.22",