From 06f5b380e27d23d97e9b1f561a66e8d61528fbb4 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Fri, 27 Dec 2024 13:46:44 +0530 Subject: [PATCH] docs: update WebAssembly introduction with slug and add client redirects plugin --- docs/webassembly/introduction.md | 2 ++ docusaurus.config.js | 14 ++++++++++++++ package-lock.json | 29 +++++++++++++++++++++++++++-- package.json | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/docs/webassembly/introduction.md b/docs/webassembly/introduction.md index 4b13812..d2333ce 100644 --- a/docs/webassembly/introduction.md +++ b/docs/webassembly/introduction.md @@ -1,6 +1,8 @@ --- sidebar_position: 1 title: WebAssembly Introduction +slug: /webassembly + --- In simple terms WebAssembly (Wasm) is a binary instruction format. With WebAssembly, you can write code in languages like C, C++, and Rust, and run it in the browser at near-native speed. It is design to run alongside JavaScript, allowing both to work together. diff --git a/docusaurus.config.js b/docusaurus.config.js index e554487..8f6f72e 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -90,6 +90,20 @@ const config = { darkTheme: prismThemes.dracula, }, }), + + plugins: [ + [ + '@docusaurus/plugin-client-redirects', + { + redirects: [ + { + from: ['/webassembly'], // Old paths + to: '/webassembly/introduction', // Target path + }, + ], + }, + ], + ], }; export default config; diff --git a/package-lock.json b/package-lock.json index efed876..2764e0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,9 +6,10 @@ "packages": { "": { "name": "devops", - "version": "2.3.3", + "version": "2.3.4", "dependencies": { "@docusaurus/core": "^3.6.3", + "@docusaurus/plugin-client-redirects": "^3.6.3", "@docusaurus/preset-classic": "^3.6.3", "@mdx-js/react": "^3.1.0", "clsx": "^2.1.1", @@ -23,7 +24,7 @@ "@docusaurus/types": "^3.6.3" }, "engines": { - "node": ">=18.0" + "node": ">=22.0" } }, "node_modules/@algolia/autocomplete-core": { @@ -3629,6 +3630,30 @@ "react-dom": "*" } }, + "node_modules/@docusaurus/plugin-client-redirects": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.6.3.tgz", + "integrity": "sha512-fQDCxoJCO1jXNQGQmhgYoX3Yx+Z2xSbrLf3PBET6pHnsRk6gGW/VuCHcfQuZlJzbTxN0giQ5u3XcQQ/LzXftJA==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.6.3", + "@docusaurus/logger": "3.6.3", + "@docusaurus/utils": "3.6.3", + "@docusaurus/utils-common": "3.6.3", + "@docusaurus/utils-validation": "3.6.3", + "eta": "^2.2.0", + "fs-extra": "^11.1.1", + "lodash": "^4.17.21", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, "node_modules/@docusaurus/plugin-content-blog": { "version": "3.6.3", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.6.3.tgz", diff --git a/package.json b/package.json index b253b9a..e99766d 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@docusaurus/core": "^3.6.3", + "@docusaurus/plugin-client-redirects": "^3.6.3", "@docusaurus/preset-classic": "^3.6.3", "@mdx-js/react": "^3.1.0", "clsx": "^2.1.1",