postdoc build


Builds the site into the output directory, out by default. It compiles every page, bundles the CSS and JavaScript that layouts reference, copies the public files and writes the search index. With pwa.enabled, it also generates a service worker and a web app manifest. Unless llms.enabled is false, it writes an llms.txt and a copy of each Markdown page as well, for AI agents.

Drafts, pages with draft: true in their front matter, are left out. A page that can't be compiled is left out too, and the command then exits with 1, after building the rest.

Options:

  • --out-dir <dir> - builds into this directory instead of the configured outputPath, which is then left as it is.

Example

sh
npx postdoc build --out-dir /tmp/site