File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ function generatePreview() {
14
14
const outPath = path . resolve ( __dirname , '..' ) ;
15
15
const outHTML = srcHTML
16
16
// Replace CDN URLs with local paths
17
- . replace ( / \/ \/ c d n .j s d e l i v r .n e t \/ n p m \/ d o c s i f y @ 4 \/ / g, '/' ) ;
17
+ . replace ( / \/ \/ c d n .j s d e l i v r .n e t \/ n p m \/ d o c s i f y @ 4 \/ / g, '/' )
18
+ // Enable basePath to simulate /docs as root
19
+ . replace ( / ( \/ \/ ) ( b a s e P a t h : ) / , '$2' ) ;
18
20
19
21
fs . writeFileSync ( path . resolve ( outPath , file ) , outHTML ) ;
20
22
}
Original file line number Diff line number Diff line change 87
87
'https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@master/$1' ,
88
88
} ,
89
89
auto2top : true ,
90
- // basePath: 'docs', // Required for Vercel preview deployment
90
+ basePath : 'docs' , // Required for Vercel preview deployment
91
91
coverpage : true ,
92
92
executeScript : true ,
93
93
loadSidebar : true ,
You can’t perform that action at this time.
0 commit comments