File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,17 @@ function generateDocsRedirects(basePath: string): RedirectRule[] {
2020 return basePath === '/' ? path : `${ basePath } ${ path } ` ;
2121 } ;
2222
23- return [
23+ const redirects : RedirectRule [ ] = [ ] ;
24+
25+ // Only add root redirect if docs are not at root
26+ if ( basePath !== '/' ) {
27+ redirects . push ( {
28+ from : '/' ,
29+ to : basePath ,
30+ } ) ;
31+ }
32+
33+ redirects . push (
2434 // Operations API
2535 {
2636 from : withBase ( '/developers/operations-api/utilities' ) ,
@@ -146,7 +156,9 @@ function generateDocsRedirects(basePath: string): RedirectRule[] {
146156
147157 // File rename redirect
148158 { from : withBase ( '/administration/logging/logging' ) , to : withBase ( '/administration/logging/standard-logging' ) } ,
149- ] ;
159+ ) ;
160+
161+ return redirects ;
150162}
151163
152164// Combine all redirects
You can’t perform that action at this time.
0 commit comments