File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,16 @@ export function getProductStringFromPath(href) {
102
102
103
103
if ( href === '/' ) return 'homepage'
104
104
105
+ // The first segment will always be empty on this split
105
106
const pathParts = href . split ( '/' )
106
107
107
108
if ( pathParts . includes ( 'early-access' ) ) return 'early-access'
108
109
109
110
// For rest pages the currentProduct should be rest
110
111
// We use this to show SidebarRest, which is a different sidebar than the rest of the site
111
112
if ( pathParts [ 1 ] === 'rest' ) return 'rest'
113
+ if ( pathParts [ 1 ] === 'copilot' ) return 'copilot'
114
+ if ( pathParts [ 1 ] === 'get-started' ) return 'get-started'
112
115
113
116
return productIds . includes ( pathParts [ 2 ] ) ? pathParts [ 2 ] : pathParts [ 1 ]
114
117
}
You can’t perform that action at this time.
0 commit comments