Skip to content

Commit 403ca55

Browse files
authored
Merge pull request #93 from autumn-library/copilot/fix-92
Fix single-page mode 404 errors on GitHub Pages by adding .nojekyll file
2 parents 60d7f45 + 2374622 commit 403ca55

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.vitepress/config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ export default defineConfig({
2828
generateAllSinglePages();
2929
// Generate toggle mode single-page documentation
3030
generateAllToggleSinglePages();
31+
32+
// Create .nojekyll file for GitHub Pages
33+
const distPath = path.join(process.cwd(), '.vitepress', 'dist');
34+
const nojekyllPath = path.join(distPath, '.nojekyll');
35+
if (!fs.existsSync(nojekyllPath)) {
36+
fs.writeFileSync(nojekyllPath, '');
37+
console.log('Created .nojekyll file for GitHub Pages');
38+
}
3139
},
3240

3341
transformPageData(pageData, ctx) {

0 commit comments

Comments
 (0)