File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 6767 - name : Build website
6868 run : ap build
6969 env :
70- NODE_ENV : production
70+ BASE_PATH : /afterpython
7171
7272 - name : Upload artifact
7373 uses : actions/upload-pages-artifact@v3
Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ const config = {
1616 precompress : false ,
1717 strict : true ,
1818 } ) ,
19+ // GitHub Pages serves sites from a subdirectory (e.g., username.github.io/repo-name/)
20+ // Set base path via BASE_PATH env var so all routes and assets are correctly prefixed
21+ // Without this, routes like /doc would resolve to username.github.io/doc instead of username.github.io/afterpython/doc
1922 paths : {
20- base : process . env . NODE_ENV === 'production' ? '/afterpython' : '' ,
23+ base : process . env . BASE_PATH || '' ,
2124 } ,
2225 alias : {
2326 // '@': 'src/',
Original file line number Diff line number Diff line change 6767 - name : Build website
6868 run : ap build
6969 env :
70- NODE_ENV : production
70+ BASE_PATH : /afterpython
7171
7272 - name : Upload artifact
7373 uses : actions/upload-pages-artifact@v3
You can’t perform that action at this time.
0 commit comments