From 76e3b1450c6ee3a0253fd6c9a92d83cbd30998a3 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Mon, 11 May 2026 18:22:35 +0800 Subject: [PATCH] Redirect old docs to new docs site --- docusaurus.config.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index bdd51cc..e199b9c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -5,6 +5,37 @@ const { themes } = require('prism-react-renderer'); const lightTheme = themes.github; const darkTheme = themes.dracula; const isGithubPagesEnv = process.env.GITHUB_PAGES_ENV === 'true'; +const newDocsUrl = 'https://fleetbase.io/docs'; + +function redirectToNewDocsPlugin() { + return { + name: 'redirect-to-new-docs', + injectHtmlTags() { + return { + headTags: [ + { + tagName: 'meta', + attributes: { + 'http-equiv': 'refresh', + content: `0;url=${newDocsUrl}`, + }, + }, + { + tagName: 'link', + attributes: { + rel: 'canonical', + href: newDocsUrl, + }, + }, + { + tagName: 'script', + innerHTML: `window.location.replace('${newDocsUrl}');`, + }, + ], + }; + }, + }; +} /** @type {import('@docusaurus/types').Config} */ const config = { @@ -58,6 +89,7 @@ const config = { ], plugins: [ + redirectToNewDocsPlugin, 'docusaurus-plugin-image-zoom', [ '@scalar/docusaurus',