From d963e5050269aacb364aff1ebc9d5dd9ea63a461 Mon Sep 17 00:00:00 2001 From: Damian Stasik <920747+damianstasik@users.noreply.github.com> Date: Thu, 31 Aug 2023 21:09:13 +0200 Subject: [PATCH] Handle old url to the blog post --- docusaurus.config.js | 11 +++++++++++ package-lock.json | 24 ++++++++++++++++++++++++ package.json | 1 + 3 files changed, 36 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 99b7c5bd..2cf64a83 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -51,6 +51,17 @@ const config = { }, }; }, + [ + "@docusaurus/plugin-client-redirects", + { + redirects: [ + { + to: "/blog/opentf-announces-fork-of-terraform", + from: "/announcement", + }, + ], + }, + ], ], themeConfig: diff --git a/package-lock.json b/package-lock.json index 82aeaf7d..3f2689dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@docusaurus/core": "2.4.1", "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/preset-classic": "2.4.1", "@mdx-js/react": "^1.6.22", "@tailwindcss/typography": "^0.5.9", @@ -2342,6 +2343,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", diff --git a/package.json b/package.json index ec62b1cb..bbb54e2d 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "dependencies": { "@docusaurus/core": "2.4.1", "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/preset-classic": "2.4.1", "@mdx-js/react": "^1.6.22", "@tailwindcss/typography": "^0.5.9",