Docs

Installation And Local Setup

Set up the local site, run the benchmark scripts, and recover quickly when the preview environment or build cache breaks.

Requirements

  • Node.js 22 is the current baseline used by this repository
  • npm is the default package manager, and nvm is recommended for switching Node versions
  • Hugo is required when running the Hugo benchmark target
  • Python or Go may be needed by specific benchmark targets or external generators as the benchmark set expands
If you use a different Node major version, document it before trusting build or benchmark results.

Install dependencies

Start from the repository root and install the main site dependencies first. Then install any benchmark-specific dependencies inside the benchmark site directories you plan to run.

  1. Switch to the repository root
  2. Use Node 22 through nvm
  3. Install the root package dependencies
  4. Install benchmark target dependencies only when you plan to run that target
Root setupbash
git clone <your-repository-url>
cd SSG-Radar
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
nvm use 22
npm install
Example target setupbash
cd benchmarks/astro/site
npm install

Run the site locally

  1. Start the local preview server
  2. Use a dedicated port such as 3002 if another service is already on 3000
  3. Open the homepage first, then verify Docs and framework pages
Start dev serverbash
cd SSG-Radar
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
nvm use 22
npm run dev
Expected outputtext
▲ Next.js 15.x
- Local:        http://localhost:3000
✓ Starting...
✓ Ready in ~2s

Build and export

Use npm run build before trusting that route changes, docs changes, or benchmark-driven data updates are safe to publish.

A successful production build matters more than a lucky dev session because static export is the deployment target.

Production buildbash
cd SSG-Radar
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
nvm use 22
npm run build

Run benchmarks

  • Generate or sync the shared content fixture before comparing frameworks
  • Run framework-specific benchmark scripts from the repository root
  • Use the run-all entrypoint only after each target site has its own dependencies installed
  • Keep the generated latest.json outputs with the measured command, timestamp, and blocked status when a run fails
Run one benchmark targetbash
cd SSG-Radar
bash benchmarks/hugo/run-benchmark.sh
Run all configured targetsbash
cd SSG-Radar
bash benchmarks/run-all.sh
Result shapejson
{
  "framework": "hugo",
  "status": "measured",
  "measured_at": "2026-04-03T11:25:00Z",
  "cold_build_seconds": 0.48,
  "incremental_build_seconds": 0.36,
  "peak_rss_kb": 0
}

Troubleshooting

  • If .next cache chunks break, stop the dev server, remove the .next directory, and restart npm run dev
  • If the port is already occupied, either kill the old preview process or restart dev on a different port
  • If a benchmark target is missing dependencies, install the target-specific packages before rerunning the script
  • If an external binary like Hugo is missing, install it first and rerun the benchmark instead of marking the framework as failed
Clear broken Next.js cachebash
cd SSG-Radar
rm -rf .next
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
nvm use 22
npm run dev
Check the default dev portbash
lsof -nP -iTCP:3000 -sTCP:LISTEN
Most local preview errors in this repository come from stale .next dev chunks, not from application code.