`dxb dev` runs your documentation locally so you can see exactly how it will look on your published site — with live reload as you edit. It's the fastest feedbac...
`dxb dev` runs your documentation locally so you can see exactly how it will look on your published site — with live reload as you edit. It's the fastest feedbac...
dxb dev runs your documentation locally so you can see exactly how it will look on your published site — with live reload as you edit. It's the fastest feedback loop for docs-as-code: edit an .mdx file, save, and the preview updates.
Start the preview server
From your project root:
dxb devThe server starts on port 4000 by default and watches your base path for changes. Open the printed URL to see your docs rendered with your theme, navigation, and blocks — exactly as readers will.
Options
| Flag | Description |
|---|---|
| `--port <n>` | Run on a specific port (default `4000`). |
| `--open` | Open a browser automatically on start. |
# Run on port 5000 and open the browser
dxb dev --port 5000 --openLive reload
While dxb dev is running, saving a file updates the preview:
- Edit a page's
.mdx→ that page refreshes. - Edit
docs.json→ navigation updates. - Add an image → it appears.
No manual refresh, no restart.
What the preview renders
The dev server renders your docs with full fidelity:
- All Doxbrix blocks — callouts, steps, tabs, code groups, Mermaid diagrams.
- Your branding and theme, including light/dark mode.
- Navigation, table of contents, and responsive layout.
A tight editing loop
Run dxb dev --open once and leave it running.
Make changes in your editor; the preview reloads on save.
Run dxb lint in another terminal before you push.
Sharing a preview
dxb dev is local-only. To let teammates or stakeholders see unpublished docs, use the app's Preview (and the Preview access rule), or open the project in the app with dxb open.
Troubleshooting
| Symptom | Fix |
|---|---|
| Port already in use | Use `--port` to pick another. |
| Changes not reloading | Confirm the file is under your configured base path. |
| Blocks not rendering | Run `dxb lint` — an unknown component may be the cause. |