Skip to Content
Fumadocs

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.

  1. Configure Search Server.
  2. Configure Search UI/Client.

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:

next.config.mjs
/**
 * @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?

Last updated on