mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
f14cca3b52
* Standardize style: 'Click' to 'Select' for Mintlify UI; split long sentences Generated-By: mintlify-agent * Revert 'select' back to 'click' for UI interactions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix select→click for UI elements across docs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
86 lines
3.5 KiB
Plaintext
86 lines
3.5 KiB
Plaintext
---
|
|
title: "Offline export"
|
|
description: "Export your documentation site as a self-contained zip archive for offline viewing, internal distribution, or air-gapped environment hosting."
|
|
keywords: ["export", "offline", "zip", "static site", "distribution", "mint export"]
|
|
---
|
|
|
|
Use `mint export` to package your entire documentation site into a self-contained zip archive. Recipients can unzip and view the docs in their browser without an internet connection, a Mintlify account, or any build tools—they only need [Node.js](https://nodejs.org) 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, air-gapped environments, or internal compliance reviews.
|
|
|
|
## Prerequisites
|
|
|
|
- The [CLI](/cli/install) installed and up to date
|
|
- [Node.js](https://nodejs.org) v20.17.0+ installed
|
|
|
|
## Export your site
|
|
|
|
Navigate to your documentation directory containing your `docs.json` file and run:
|
|
|
|
```bash
|
|
mint export
|
|
```
|
|
|
|
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
|
|
|
|
| Flag | Description | Default |
|
|
|---|---|---|
|
|
| `--output <path>` | Set the output zip file path. | `export.zip` |
|
|
| `--groups <group>` | Mock [user groups](/deploy/authentication-setup#control-access-with-groups) for the export. Useful when your docs use group-based access control and you want the archive to include restricted pages. | — |
|
|
| `--disable-openapi` | Skip OpenAPI file generation during the export. Use this if you have many OpenAPI specs and want faster builds. | — |
|
|
|
|
For example, to export your site to a custom filename with a specific user group:
|
|
|
|
```bash
|
|
mint export --output customer-docs.zip --groups enterprise
|
|
```
|
|
|
|
<Note>
|
|
The export only includes pages listed in your navigation. [Hidden pages](/organize/hidden-pages) are not included in the archive.
|
|
</Note>
|
|
|
|
## What's in the zip
|
|
|
|
The exported archive contains everything needed to view your docs offline:
|
|
|
|
| File | Purpose |
|
|
|---|---|
|
|
| HTML pages | Pre-rendered version of every page in your navigation |
|
|
| `_next/static/` | Bundled CSS, JavaScript, and other static assets |
|
|
| `serve.js` | Zero-dependency Node.js HTTP server that serves the site |
|
|
| `Start Docs.command` | macOS launcher—double-click to open the docs |
|
|
| `Start Docs.bat` | Windows launcher—double-click to open the docs |
|
|
|
|
## View the exported docs
|
|
|
|
Share the zip file with anyone who has Node.js installed. To view the docs:
|
|
|
|
<Tabs>
|
|
<Tab title="Manual">
|
|
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.
|
|
</Tab>
|
|
<Tab title="macOS">
|
|
1. Unzip the archive.
|
|
2. Double-click **Start Docs.command**.
|
|
3. The docs open in your default browser at `http://localhost:3000`.
|
|
|
|
<Note>
|
|
macOS may block the file because it was downloaded from the internet. If you see a security warning, go to **System Settings > Privacy & Security** and click **Open Anyway**. See [Apple's guide to overriding security settings](https://support.apple.com/guide/mac-help/mh40617/mac) for details.
|
|
</Note>
|
|
</Tab>
|
|
<Tab title="Windows">
|
|
1. Unzip the archive.
|
|
2. Double-click **Start Docs.bat**.
|
|
3. The docs open in your default browser at `http://localhost:3000`.
|
|
|
|
<Note>
|
|
Windows may show a "Windows protected your PC" warning because the file was downloaded from the internet. Click **More info**, then click **Run anyway**.
|
|
</Note>
|
|
</Tab>
|
|
</Tabs>
|