Skip to main content
Offline exports require an Enterprise plan.
Use mint export to package your entire documentation site into a zip archive of pre-rendered pages. Recipients can unzip and view the docs in their browser without a Mintlify account or any build tools. They only need Node.js installed. This is useful when you need to distribute documentation to users who can’t access your live site, such as for on-premise customers or internal compliance reviews. The CLI bundles the icons, fonts, and LaTeX styles your site uses into the archive, so exported docs work in air-gapped environments without internet access. Exports are served from the root of a domain unless you set a base path. Review the limitations before you deploy an export.

Prerequisites

  • The CLI installed and up to date
  • Node.js v20.17.0+ installed

Limitations

  • Offline exports do not support the Mintlify assistant.
  • Offline exports do not include analytics or other integrations configured in your docs.json.
  • Images and other files that your pages reference by external URL are not bundled. Store them in your project to include them in the archive.
The search bar works in exported docs without a network connection. When you run mint export, the CLI builds a search index from the exported pages and saves it in the archive. The browser searches that index locally. Offline search follows the same rules as search on your live site. It skips pages that are hidden from search, such as pages with noindex: true or searchable: false in their frontmatter. Results only include pages in the reader’s current language and version.

Bundled assets

When you run mint export, the CLI downloads assets that your site loads from external hosts and saves them in the archive. This includes:
  • Icons referenced by name, such as Font Awesome and Lucide icons.
  • Code block language icons and language selector flags.
  • Google Fonts and externally hosted fonts.
  • LaTeX stylesheets and fonts.
  • Files referenced from bundled stylesheets.
The computer running mint export needs internet access to download these assets. The CLI only downloads assets from public hosts. If an asset fails to download, the CLI prints a could not bundle <url> warning, and the exported docs load that asset from its original host.

Export your site

Navigate to your documentation directory containing your docs.json file and run:
The CLI builds your site, crawls every page defined in your navigation, and packages the output into a zip file in your current directory.

Options

For example, to export your site to a custom filename with a specific user group:
The export only includes pages listed in your navigation. Hidden pages are not included in the archive.

Serve under a subpath

By default, an export is served from the root of a domain, such as http://localhost:3000/. To serve it under a subpath instead, pass the path with --base-path:
The CLI prefixes links, images, favicons, and bundled assets with the base path, and serve.js serves the docs at http://localhost:3000/docs/. A request to the root redirects to the base path. The base path can contain letters, numbers, hyphens, and underscores, with segments separated by /, such as /docs or /product/docs. The export fails if any page path starts with the base path. For example, --base-path /docs fails if your navigation includes a page at docs/intro. Choose a base path that no page uses.

Pin the client version

By default, mint export builds your site with the latest Mintlify client release that is compatible with your CLI version. To build with a specific release instead, pass its version with --client-version:
The CLI downloads that release from releases.mintlify.com before it builds the export. Pin a version when you need repeated exports to render the same way, for example when you regenerate an archive for the same customer. If the download fails and the CLI already has a client release cached from an earlier run, the CLI builds the export with the cached release instead.

Security considerations

The exported archive is a static, unauthenticated bundle. Anyone with the zip file can view every page it contains.
  • The --groups flag controls which group-restricted pages Mintlify includes in the archive at export time. It does not enforce authentication after export.
  • Only share archives with recipients who are allowed to see the content they contain.
  • Regenerate and redistribute the archive to publish new changes. Anyone running an older zip continues to see the older content.

What’s in the zip

The exported archive contains your pre-rendered pages, their bundled assets, and a server to view them:

View the exported docs

Share the zip file with anyone who has Node.js installed. To view the docs:
  1. Unzip the archive.
  2. Open a terminal in the unzipped directory.
  3. Run node serve.js.
  4. Open http://localhost:3000 in your browser.

Host the export on your own server

To host an export on your own web server instead of serve.js, serve the unzipped folder as static files from the root of a domain. If you exported with --base-path, serve the folder under that path instead, and apply these rules to the part of the request path after the base path:
  1. Pages: Serve <path>/index.html for a request to /<path>.
  2. Client-side navigation: For a request with an RSC: 1 header or an _rsc query parameter, serve <path>/index.txt with Content-Type: text/x-component and Vary: RSC. Without this rule, every link click loads a full page.
  3. Caching: Serve _next/static/* and _mintlify/export-assets/* with Cache-Control: public, max-age=31536000, immutable. Serve pages and index.txt files with Cache-Control: no-cache.
serve.js implements all three rules, so you can use it as a reference.