File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,17 @@ function PageActionsDropdown(): ReactNode {
7474 return 'docs/introduction.md' ;
7575 }
7676
77- // For paths that look like directories, try .md first, then /index.md
77+ // For paths that look like directories
7878 if ( ! mdPath . includes ( '.' ) ) {
79- // First try the direct .md file
80- mdPath = `docs/${ mdPath } .md` ;
79+ // Check if it has multiple segments (likely a directory with index.md)
80+ const segments = mdPath . split ( '/' ) ;
81+ if ( segments . length > 1 || segments [ 0 ] === 'agent-wordlift' || segments [ 0 ] === 'pages' ) {
82+ // For directories, use index.md
83+ mdPath = `docs/${ mdPath } /index.md` ;
84+ } else {
85+ // For single-level paths under pages/, try .md first
86+ mdPath = `docs/${ mdPath } .md` ;
87+ }
8188 }
8289
8390 return mdPath ;
You can’t perform that action at this time.
0 commit comments