Static Build
Output static website with Fumadocs.
Setup
By default, Fumadocs uses a server-first approach, which requires a running server. You can output a static build by configuring Next.js.
A static build has no server, so these features don't work:
- The search server. Use static search instead.
- Ask AI, whose chat route calls the AI model.
- The MCP server.
proxy.ts doesn't run either, so there are no i18n redirects to a locale, and pages don't serve Markdown for the Accept header.
Search
Built-in Search
After the configurations, your app will statically store the search indexes, and search will be computed on browser instead.
Cloud Solutions
Since the search functionality is powered by remote servers, static export works without configuration.
Deployment
Enable static export to output a static HTML site that runs without a Node.js server:
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: 'export',
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,
// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,
};See Next.js docs for limitations and details.
How is this guide?
