Guides
Installation
Self-host the docs site, configure the build, and understand the static export.
This placeholder describes how the documentation site itself is built and deployed, which doubles as a worked example of the toolchain the platform uses.
Requirements#
| Requirement | Version |
|---|---|
| Node | 22 or later |
| npm | 10 or later |
| A static host | Any that serves files |
Build the site#
The site is exported to plain files. There is no server process and no environment variable to set.
npm install
npm run buildThe build writes the site to out/. Serve that directory with any static host.
Search index
Pagefind runs after the build and writes its index into out/pagefind. Search therefore works in a built site and not under next dev.
Verify the output#
Serve the directory
Point a static file server at
out/and open the root. It redirects to the Guides tab.Check every tab
Visit Guides, API Reference and Connectors and confirm the sidebar and the table of contents track the page.
Toggle the theme
Switch between light, dark and system and reload. The page must not flash the wrong theme.
Configuration#
// next.config.mjs
const nextConfig = {
output: "export",
trailingSlash: true,
images: { unoptimized: true },
};
export default nextConfig;Why a static export#
A documentation site has no per-request work. Prerendering it removes a whole class of runtime failure: there is no server to fall over, no cold start and nothing to patch in production.