Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -58,6 +89,7 @@ const config = {
],

plugins: [
redirectToNewDocsPlugin,
'docusaurus-plugin-image-zoom',
[
'@scalar/docusaurus',
Expand Down
Loading