File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,20 @@ console.log('Finding MD files');
2222
2323const paths : { path : string ; url : string } [ ] = [ ] ;
2424
25- await totalist ( repoPath , ( relative , path ) => {
26- if ( ! relative . endsWith ( '.md' ) || ! relative . startsWith ( 'src/routes' ) ) return ;
27-
28- const pathname = relative
29- . replace ( 'src/routes' , '' )
25+ await totalist ( `${ repoPath } /src/content` , ( relative , path ) => {
26+ if (
27+ ! relative . endsWith ( '.md' ) ||
28+ ! [ 'docs' , 'guides' ] . includes ( relative . slice ( 0 , relative . indexOf ( '/' ) ) )
29+ )
30+ return ;
31+
32+ let pathname = relative
3033 . slice ( 0 , - 3 )
3134 . replace ( / \/ i n d e x $ / gm, '/' )
3235 . replace ( / \/ $ / gm, '' ) ;
3336
3437 paths . push ( {
35- url : `https://www.gitpod.io${ pathname } ` ,
38+ url : `https://www.gitpod.io/ ${ pathname } ` ,
3639 path,
3740 } ) ;
3841} ) ;
You can’t perform that action at this time.
0 commit comments