跳到导航

Export your docs

以 Markdown 格式查看

fern docs export downloads a snapshot of your live Fern-hosted docs site, for readers who can’t reach it, such as air-gapped environments or a compliance archive. After you publish changes, export again to include them.

Prerequisites

Export your site

Run the command from your Fern project:

fern docs export # static HTML site (default)
fern docs export --format md # each page's Markdown and llms.txt
fern docs export --format pdf # one PDF, the same as the Dashboard PDF export

The CLI writes to a folder named after the site, such as docs-acme-com-html. Links in an HTML export are relative file paths, so the folder works on any static host, such as Amazon S3 or nginx, without rewrite rules. To view it locally:

npx serve docs-acme-com-html

Use --output to choose the destination and --instance to pick an instance when docs.yml lists more than one. For PDF cover, header, and footer options, see the command reference.

Limits

  • Each organization can run 150 exports per day across HTML, Markdown, and PDF, from the CLI and the Dashboard.
  • fern docs export only works for Fern-hosted sites. For self-hosted docs, use the container’s static export.

Security

An export has no authentication. Anyone with the files can read every page in them.

If your site uses authentication or role-based access control, the export includes gated pages. Share it only with readers allowed to see all your content.