Step 7: Test 2–3 rounds
Now you'll test the site before anyone else sees it.
Before you start
- Step 6 finished
Do it
Type each command on its own and wait for it to finish before the next one.
Round 1. Build the site.
npm run buildExpected output
vitepress v1.6.x
✓ building client + server bundles...
✓ rendering pages...
build complete in 3.2s.Run the checks.
npm testExpected output
OK: 8 pages, 69 internal links checkedIf you see an error:
FAIL ... -> /some/pagemeans a broken link. Fix the link in that page, then run both commands again.
Round 2. Preview the built site. Check it in a normal window and a phone-sized window.
npm run previewExpected output
➜ Local: http://localhost:4173/Round 3. Test a clean copy, like Cloudflare will.
git clone . /tmp/site-test
cd /tmp/site-testExpected output
Cloning into '/tmp/site-test'...
done.npm ciExpected output
added 163 packages in 12snpm run checkExpected output
OK: 8 pages, 69 internal links checkedIf you see an error:
npm cifails with a lockfile message: runnpm installin your project, commitpackage-lock.json, then repeat round 3.
Result
All three rounds pass. The included CI workflow runs the same checks on every pull request.
Checkpoint
Next step
Step 8: Deploy (Cloudflare or Vercel)
Back: Step 6: Write the docs