Share a Nextra site

Nextra is a docs theme on top of Next.js, which means the preview problem is the Next.js preview problem: next dev is yours alone, and the only other copy is whatever is deployed.

Export

// next.config.mjs
export default { output: "export" };
npx next build
# → out/

Opening out/index.html from the Finder gives you unstyled markup — Next references its chunks absolutely under /_next/…, which at a file:// origin points at your filesystem root. Over HTTP with the folder uploaded, those paths resolve.

Publish out/

Drag the folder into the app, or zip and POST it:

cd out && zip -qr ../site.zip . && cd ..

curl -fsS -X POST https://commareports.com/api/v1/reports \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -F "title=Docs — $(git rev-parse --abbrev-ref HEAD)" \
  -F "visibility=team" \
  -F "bundle=@site.zip"

cd into out before zipping so index.html sits at the archive root — see sharing a folder of HTML files.

What the review link gets you

  • Anchored threads — copy feedback attaches to the sentence on the rendered page. See commenting on HTML.
  • Revisions at one URL — one report id per branch; the link in the PR is always current.
  • Access per report — private, team-only, domain-gated, or unlisted. See the sharing model.
  • Scripts run, sandboxed — client components hydrate inside a sandboxed iframe, so interactive examples work without touching anyone's session.

Limits

  • Assets: 25 MB per file, 250 MB and 500 files per report. A large Next export can exceed 500 files; delete source maps (**/*.map) before zipping.
  • Entry HTML: 5 MB.
  • 60 requests/minute per token.

Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision history.

Publish a site preview →

Related