postdoc run


Starts the development server. Pages are compiled when you open them, and the browser reloads when a page, layout, include or API source file changes.

Options:

  • --host [host] - listens on all network interfaces, or on the given host, so other devices on your network can open the site.
  • --open [path] - opens the site in your browser when the server starts, optionally at the given path.
  • --port <port> - serves the site on this port, and fails if it's taken, so a second server, such as one an AI agent starts to check its work, never takes another one's place.

Without --port, the port comes from vite.server.port in the configuration file, and without that, Vite's default port 5173 is used.

Drafts, pages with draft: true in their front matter, are shown by the dev server but left out of builds.

Example

sh
npx postdoc run --open /guide/index.html