Fix CLI build and clarify Netlify CI

This commit is contained in:
thePR0M3TH3AN
2025-07-10 12:21:26 -04:00
parent dab65efd2e
commit ed83ccb7ed
3 changed files with 9 additions and 2 deletions

View File

@@ -229,7 +229,7 @@ To make DocForge truly user-friendly, include these instructions in the starter
- `netlify.toml`:
```toml
[build]
command = "npm run build"
command = "CI= npm run build" # Avoid CI treating warnings as errors
publish = "_site"
```
- Connect the repo to Netlify by selecting **New site from Git** in your Netlify dashboard and picking this repository. Netlify will read `netlify.toml` so no extra setup is required. Once linked, pushes to `main` automatically build and deploy the site and pull requests get preview URLs.

View File

@@ -1,3 +1,3 @@
[build]
command = "npm run build"
command = "CI= npm run build"
publish = "_site"

View File

@@ -166,3 +166,10 @@ async function generate({ contentDir = 'content', outputDir = '_site', configPat
}
module.exports = { generate, buildNav };
if (require.main === module) {
generate().catch(err => {
console.error(err);
process.exit(1);
});
}