Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion deploy/export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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](#serve-under-a-subpath). Review the [limitations](#limitations) before you deploy an export.

Check warning on line 15 in deploy/export.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/export.mdx#L15

In general, use active voice instead of passive voice ('are served').

## Prerequisites

Expand All @@ -21,11 +21,16 @@

## Limitations

- Offline exports do not support search. To add offline search, index the exported HTML with a static search tool.
- Offline exports do not support the Mintlify assistant.
- Offline exports do not include analytics or other [integrations](/organize/settings-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 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](/organize/hidden-pages), 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:
Expand Down Expand Up @@ -84,7 +89,7 @@
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.

Check warning on line 92 in deploy/export.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/export.mdx#L92

In general, use active voice instead of passive voice ('are allowed').
- 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
Expand All @@ -97,6 +102,7 @@
| `index.txt` files | Page data for client-side navigation, saved next to each page's HTML |
| `_next/static/` | Bundled CSS, JavaScript, and other static assets |
| `_mintlify/export-assets/` | Icons, fonts, and other assets downloaded from external hosts |
| `_mintlify/search-index.json` | Search index for [offline search](#offline-search) |
| `llms.txt` | Index of the exported pages for AI tools |
| `README.md` | Instructions for viewing the export and hosting it on your own server |
| `serve.js` | Zero-dependency Node.js HTTP server that serves the site |
Expand Down Expand Up @@ -139,7 +145,7 @@
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.

Check warning on line 148 in deploy/export.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/export.mdx#L148

Spell out 'RSC', if it's unfamiliar to the audience.
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.
Loading