For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Slack communityLog inBook a demo
  • Getting Started
    • Overview
    • Quickstart
    • Customer Showcase
  • Writing Content
    • Markdown
    • Visual Editor
    • Reusable Markdown
    • Custom React Components
    • Changelog
LogoLogo
Slack communityLog inBook a demo
On this page
  • "Initialize your ""fern"" folder"
  • Update your docs
  • Publish to production
Getting Started

Quickstart

Start building beautiful documentation in under 5 minutes
Was this page helpful?
Previous

Write docs content using Markdown

Next
Built with
Docs cascade

With Fern, you can build beautiful developer documentation that matches your brand. Fern supports writing pages (written in Markdown) and generating API Reference documentation (from an OpenAPI Specification).

In this guide, we’ll show you how to get started with Fern in under 5 minutes.

1

Initialize your fern folder

All the configurations for your docs live in the fern folder. Inside, you’ll find a docs.yml file that contains all the settings for your documentation.

Clone the starter repository

Get started by cloning the starter template.

$git clone git@github.com:fern-api/docs-starter.git

Next, please update the template settings to use your organization.

Edit template settings

Please edit the details fern.config.json and docs.yml with your organization name.

1{
2 "organization": "{{YOUR_ORGANIZATION}}",
3 "version": "0.x.x"
4}

Finally, navigate to the docs directory (where the fern folder is located) and execute the following command to generate your documentation:

$fern generate --docs
Use the Fern CLI

If you prefer, you can use our CLI to create a new project. Install the CLI by running

$npm install -g fern-api

Then run

$fern init --docs

You will see a new fern folder in your project with the following structure:

$ fern
$ ├─ docs.yml
$ └─ fern.config.json

Finally, navigate to the docs directory (where the fern folder is located) and execute the following command to generate your documentation:

$fern generate --docs
2

Update your docs

We provide a white-glove migration service as part of our Enterprise plan. Interested? Request it here.

Add content

Add content with MDX files.

1---
2title: "Page Title"
3description: "Subtitle (optional)"
4---
5
6Hello world!
Supported Syntax

Fern supports GitHub flavored Markdown (GFM) within MDX files, no plugin required.

In order for the Markdown page to show up, you’ll need to reference them from your docs.yml file. You can reference the Markdown page within a section or as a standalone page.

1navigation:
2 - page: Hello World
3 path: docs/pages/hello-world.mdx
4 - section: Overview
5 contents:
6 - page: QuickStart
7 path: docs/pages/hello-world.mdx
Add an API Reference

Add an API Reference by adding an OpenAPI Specification to your project.

$fern init --openapi /path/to/openapi.yml

This will create an openapi.yml file in your project. You can reference this file in your docs.yml file by adding an api block.

1navigation:
2 - api: "API Reference"
Brand your docs

All of the branding for your docs can be configured in the docs.yml file.

For example, to set the logos, colors, and fonts for your docs, you can add the following to your docs.yml file:

docs.yml
1colors:
2 accent-primary:
3 dark: "#f0c193"
4 light: "#af5f1b"
5
6logo:
7 dark: docs/assets/logo-dark.svg
8 light: docs/assets/logo-light.svg
9 height: 40
10 href: https://buildwithfern.com/
11
12favicon: docs/assets/favicon.svg
3

Publish to production

Host on a custom domain

Fern supports hosting your docs website on a custom domain or on a custom subpath (e.g. https://domain.com/docs).

Please reach out to the Fern team at support@buildwithfern.com to configure this.

Configure analytics

Fern supports integrations with a variety of providers such as PostHog, Segment, Intercom, Google Tag Manager, etc. Find out more on this page.

Below are some examples of documentation websites that have been published using Fern:

Hume logo
Hume
Primer logo
Primer
AssemblyAI logo
AssemblyAI
SuperAgent logo
SuperAgent
MultiOn logo
MultiOn
Coactive logo
Coactive
Zep logo
Zep
Rightbrain logo
Rightbrain