Skip to content

Commit e0843db

Browse files
authored
Add redirect rule for old community pages url (#70)
* add redirect for old community pages Signed-off-by: Max Wolfs <[email protected]> * fix order Signed-off-by: Max Wolfs <[email protected]> --------- Signed-off-by: Max Wolfs <[email protected]>
1 parent 89830be commit e0843db

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

docusaurus.config.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ const config = {
3131
({
3232
docs: {
3333
sidebarPath: require.resolve("./sidebarsDocs.js"),
34-
editUrl:
35-
"https://github.com/SovereignCloudStack/docs/tree/main/",
34+
editUrl: "https://github.com/SovereignCloudStack/docs/tree/main/",
3635
},
3736
blog: {
3837
showReadingTime: true,
39-
editUrl:
40-
"https://github.com/SovereignCloudStack/docs/tree/main/",
38+
editUrl: "https://github.com/SovereignCloudStack/docs/tree/main/",
4139
},
4240
theme: {
4341
customCss: [require.resolve("./src/css/custom.css")],
@@ -51,23 +49,12 @@ const config = {
5149
{
5250
fromExtensions: ["html", "htm"], // /myPage.html -> /myPage
5351
toExtensions: ["exe", "zip"], // /myAsset -> /myAsset.zip (if latter exists)
54-
// redirects: [
55-
// // /docs/oldDoc -> /docs/newDoc
56-
// {
57-
// to: '/docs/newDoc',
58-
// from: '/docs/oldDoc'
59-
// }
60-
// ],
61-
// createRedirects (existingPath) {
62-
// if (existingPath.includes('/community')) {
63-
// // Redirect from /docs/team/X to /community/X and /docs/support/X to /community/X
64-
// return [
65-
// existingPath.replace('/community', '/docs/team'),
66-
// existingPath.replace('/community', '/docs/support')
67-
// ]
68-
// }
69-
// return undefined // Return a falsy value: no redirect created
70-
// }
52+
createRedirects(existingPath) {
53+
if (existingPath.includes("/community")) {
54+
return [existingPath.replace("/community", "/community/community")];
55+
}
56+
return undefined; // Return a falsy value: no redirect created
57+
},
7158
},
7259
],
7360
[

0 commit comments

Comments
 (0)