Skip to content

Commit

Permalink
add redirect for old community pages
Browse files Browse the repository at this point in the history
Signed-off-by: Max Wolfs <[email protected]>
  • Loading branch information
maxwolfs committed Aug 31, 2023
1 parent 89830be commit 853b19a
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ const config = {
({
docs: {
sidebarPath: require.resolve("./sidebarsDocs.js"),
editUrl:
"https://github.com/SovereignCloudStack/docs/tree/main/",
editUrl: "https://github.com/SovereignCloudStack/docs/tree/main/",
},
blog: {
showReadingTime: true,
editUrl:
"https://github.com/SovereignCloudStack/docs/tree/main/",
editUrl: "https://github.com/SovereignCloudStack/docs/tree/main/",
},
theme: {
customCss: [require.resolve("./src/css/custom.css")],
Expand All @@ -51,23 +49,12 @@ const config = {
{
fromExtensions: ["html", "htm"], // /myPage.html -> /myPage
toExtensions: ["exe", "zip"], // /myAsset -> /myAsset.zip (if latter exists)
// redirects: [
// // /docs/oldDoc -> /docs/newDoc
// {
// to: '/docs/newDoc',
// from: '/docs/oldDoc'
// }
// ],
// createRedirects (existingPath) {
// if (existingPath.includes('/community')) {
// // Redirect from /docs/team/X to /community/X and /docs/support/X to /community/X
// return [
// existingPath.replace('/community', '/docs/team'),
// existingPath.replace('/community', '/docs/support')
// ]
// }
// return undefined // Return a falsy value: no redirect created
// }
createRedirects(existingPath) {
if (existingPath.includes("/community/community")) {
return [existingPath.replace("/community/community", "/community")];
}
return undefined; // Return a falsy value: no redirect created
},
},
],
[
Expand Down

0 comments on commit 853b19a

Please sign in to comment.