Skip to content

Commit

Permalink
added redirects from /pro-and-enterprise/modules to /add-on-modules/m…
Browse files Browse the repository at this point in the history
…odules
  • Loading branch information
reganwolfrom committed Nov 28, 2024
1 parent 5cb2d86 commit 9e8f515
Show file tree
Hide file tree
Showing 16 changed files with 264 additions and 57 deletions.
71 changes: 14 additions & 57 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,18 @@
// Note: type annotations allow type checking and IDEs autocompletion

import {themes as prismThemes} from 'prism-react-renderer';
// const lightCodeTheme = require('prism-react-renderer/themes/github');
// const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'FormKiQ',
tagline: 'Build your perfect document management solution with the FormKiQ Platform',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://docs.formkiq.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'FormKiQ', // Usually your GitHub org/user name.
projectName: 'formkiq', // Usually your repo name.

organizationName: 'FormKiQ',
projectName: 'formkiq',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
Expand All @@ -44,21 +30,13 @@ const config = {
},
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/formkiq/docs.formkiq.com/tree/main/',
// docLayoutComponent: "@theme/DocPage",
// sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/formkiq/docs.formkiq.com/tree/main/',
docRootComponent: "@theme/DocRoot",
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
docItemComponent: "@theme/ApiItem",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
Expand All @@ -75,7 +53,6 @@ const config = {
hideable: true
}
},
// Replace with your project's social card
navbar: {
title: 'FormKiQ Docs',
logo: {
Expand All @@ -91,7 +68,7 @@ const config = {
href: 'https://formkiq.com',
logo: {
alt: 'FormKiQ Docs',
src: 'img/logo.png',
src: 'img/logo.png',
}
},
{
Expand Down Expand Up @@ -129,30 +106,19 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} FormKiQ, Inc. Built with Docusaurus.`,
},
algolia: {
// Algolia application ID, found in the Algolia dashboard
appId: 'GGHVG096JW',

// Public API key: it is safe to include it in your frontend
apiKey: 'f5ed2fcbe2c7680eb8e92953a38d004e',

// Index name to target, found in the Algolia dashboard
indexName: 'docs',

// Optional: if Algolia is powered by DocSearch
contextualSearch: true,

searchPagePath: 'search',

// Optional: Specifies search parameters
//searchParameters: {},
appId: 'GGHVG096JW',
apiKey: 'f5ed2fcbe2c7680eb8e92953a38d004e',
indexName: 'docs',
contextualSearch: true,
searchPagePath: 'search',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),

plugins: [
plugins: [
[
"docusaurus-plugin-openapi-docs",
{
Expand All @@ -170,19 +136,10 @@ const config = {
}
}
],
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: '/docs/add-on-modules/modules/custom-domains',
from: '/docs/pro-and-enterprise/modules/custom-domains',
}],
},
]
require.resolve('./plugins/redirect-plugin.js')
],

themes: ["docusaurus-theme-openapi-docs"]
};

export default config;
export default config;
80 changes: 80 additions & 0 deletions plugins/redirect-plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// plugins/redirect-plugin.js
module.exports = function redirectPlugin(context, options) {
return {
name: 'redirect-plugin',
async contentLoaded({content, actions}) {
const {addRoute} = actions;

addRoute({
path: '/docs/pro-and-enterprise/modules/custom-domains',
component: '@site/src/components/redirects/custom-domains',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/anti-malware-antivirus',
component: '@site/src/components/redirects/anti-malware-antivirus',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/document-generation',
component: '@site/src/components/redirects/document-generation',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/document-versioning',
component: '@site/src/components/redirects/document-versioning',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/e-signature',
component: '@site/src/components/redirects/e-signature',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/enhanced-document-ocr',
component: '@site/src/components/redirects/enhanced-document-ocr',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/enhanced-fulltext-document-search',
component: '@site/src/components/redirects/enhanced-fulltext-document-search',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/filesync-cli',
component: '@site/src/components/redirects/filesync-cli',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/full-encryption',
component: '@site/src/components/redirects/full-encryption',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/onlyoffice-document-collaboration',
component: '@site/src/components/redirects/onlyoffice-document-collaboration',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/open_policy_agent',
component: '@site/src/components/redirects/open-policy-agent',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/rulesets',
component: '@site/src/components/redirects/rulesets',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/single-sign-on-and-custom-jwt-authorizer',
component: '@site/src/components/redirects/single-sign-on-and-custom-jwt-authorizer',
exact: true
});
addRoute({
path: '/docs/pro-and-enterprise/modules/tag-schema',
component: '@site/src/components/redirects/tag-schema',
exact: true
});
},
};
};
12 changes: 12 additions & 0 deletions src/components/redirects/anti-malware-antivirus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/anti-malware-antivirus');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/custom-domains.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/custom-domains');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/document-generation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/document-generation');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/document-versioning.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/document-versioning');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/e-signature.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/e-signature');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/enhanced-document-ocr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/enhanced-document-ocr');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/enhanced-fulltext-document-search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/enhanced-fulltext-document-search');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/filesync-cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/filesync-cli');
}, []);

return null;
}
14 changes: 14 additions & 0 deletions src/components/redirects/full-encryption.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/full-encryption');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/onlyoffice-document-collaboration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/onlyoffice-document-collaboration');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/open-policy-agent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/open-policy-agent');
}, []);

return null;
}
12 changes: 12 additions & 0 deletions src/components/redirects/rulesets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react';
import { useHistory } from '@docusaurus/router';

export default function Redirect() {
const history = useHistory();

useEffect(() => {
history.replace('/docs/add-on-modules/modules/rulesets');
}, []);

return null;
}
Loading

0 comments on commit 9e8f515

Please sign in to comment.