Quickstart
Build beautiful developer documentation that matches your brand with Fern. Fern supports writing pages in Markdown and generating API Reference documentation from an OpenAPI Specification.
Follow this guide to get started with Fern in under 5 minutes.
Migrating from existing documentation? Fern provides a white-glove migration service as part of the Enterprise plan. Reach out here.
Initiate your docs
All the configuration for your docs lives in the fern folder. Create a fern folder by either using the starter template or starting from scratch
Clone the starter template
You’ll see a basic site with a fern folder that contains an API definition, Markdown pages, and configuration files. View the live example to see what the starter template looks like when published. You can use these files to test out Fern’s features, or replace them with your own files.
Start from scratch
You’ll see a new fern folder in your project with the following configuration files (but no additional Markdown or API definition files):
Configure your organization
Configure two settings (these values don’t have to match):
- Organization name in
fern.config.json: Identifies your organization in the Fern system (including the Fern Dashboard) - Docs URL in
docs.yml: Determines where your docs are published
Use only alphanumeric characters, hyphens, and underscores for both values.
Customize your docs
Now that you have a basic docs site, you can customize it by adding tutorials, generating an API Reference, or finetuning the branding. (Or skip ahead to preview and publish.)
Add content
Create Markdown (.mdx) files and fill them in. Read the Markdown basics documentation to learn more.
Fern supports GitHub flavored Markdown (GFM) within MDX files, no plugin required. You can also create reusable snippets to share content across multiple pages.
Reference your new pages from your docs.yml file. You can reference the
Markdown page within a section or as a standalone page.
Add an API Reference
If you cloned the starter template, you already have an openapi.yaml file with sample API definitions. If you started from scratch, add your OpenAPI spec:
Reference your API definition in the docs.yml file to generate API Reference documentation:
Brand your docs
Configure all of your site’s branding, such as the logo, colors, and font, in the docs.yml file.
Preview your docs
Before publishing, preview your changes in your local development environment or generate shareable preview links.
Local preview
Shareable preview link
Run the local development server with hot-reloading. Your docs will automatically update as you edit Markdown and OpenAPI files:
Publish to production
When you’re ready for your docs to be publicly accessible, publish them:
This command builds your documentation at the URL you configured in docs.yml (e.g., https://yourdomain.docs.buildwithfern.com).
Use the Fern Dashboard to manage your GitHub repository connection, organization members, and CLI version. Track analytics to understand how developers use your docs.
Explore Fern’s features
Now that your docs are live, explore these features to enhance them further.
Use the docs.yml file to configure colors, SEO, typography, layouts, and more.
Use Fern’s built-in components to create interactive, well-organized documentation.
Add products, versions, nested sections, tabs, and more.
Use the Fern Editor to let non-technical team members edit docs in a WYSIWYG browser interface.
Host your docs on your own domain or subdomain (e.g., docs.example.com).
Integrate with PostHog, Segment, Intercom, Google Tag Manager, and other platforms.