Deployment
From your docs project:
pnpm build
pnpm preview
The dist/ directory contains the static site directly: HTML, assets, route payloads,
and search files. Server bundles stay in the ignored .docskit/ working directory.
Publish dist/ to a static host. Include the pagefind/ directory so local
search can load its index.
Deploy under a subpath
Set the public origin and deployment pathname when building:
DOCS_SITE_URL=https://owner.github.io DOCS_BASE_PATH=/my-project/ pnpm build
Navigation, Markdown assets, search, and canonical URLs use the configured base
path. Keep navigation links rooted at paths such as /docs/; do not add the base
path to individual links.
Versioned output
With versioning enabled, publish the whole output directory, including next/
and v/. Each published version has its own assets, route payloads, and search
index. Pending snapshots are excluded. See Versioning for the
stable and Next route layout.
Working files and output
Docskit builds and indexes search in .docskit/ before replacing dist/ with
the completed output. Ignore both directories in version control. The previous
output is retained if compilation or indexing fails.
docskit preview serves dist/ directly. It does not require the generated
working directory or source content. Build metadata in .docskit.json preserves
the deployment base path for preview. Search indexes guides and API references;
a custom homepage is excluded from the index.
Verify the deployment
Open a guide directly by its full URL, then refresh it. Check an internal link,
a public image, and a search result. The host needs to serve nested index.html
files and the accompanying assets from the same deployment path.
For this repository's own site, run pnpm docs:build from the repository root and
publish packages/docs/dist/. Its configured public URL is
https://docskit.pinanek.me/. GitHub Actions deploys the output to Cloudflare
Pages after successful main-branch checks and package releases. See the
contributor deployment guide
for project settings and required secrets.