Offline exports require an Enterprise plan.
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
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.
Offline search
The search bar works in exported docs without a network connection. When you runmint 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 runmint 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.
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 yourdocs.json file and run:
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 ashttp://localhost:3000/. To serve it under a subpath instead, pass the path with --base-path:
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:
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
--groupsflag 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:- Manual
- macOS
- Windows
- Unzip the archive.
- Open a terminal in the unzipped directory.
- Run
node serve.js. - Open
http://localhost:3000in your browser.
Host the export on your own server
To host an export on your own web server instead ofserve.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:
- Pages: Serve
<path>/index.htmlfor a request to/<path>. - Client-side navigation: For a request with an
RSC: 1header or an_rscquery parameter, serve<path>/index.txtwithContent-Type: text/x-componentandVary: RSC. Without this rule, every link click loads a full page. - Caching: Serve
_next/static/*and_mintlify/export-assets/*withCache-Control: public, max-age=31536000, immutable. Serve pages andindex.txtfiles withCache-Control: no-cache.
serve.js implements all three rules, so you can use it as a reference.