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.
Book a demoLog inStart for free
  • Getting started
    • Overview
    • How it works
    • Quickstart
    • Project structure
    • Customer showcase
    • Changelog
  • Configuration
    • Overview
    • Site-level settings
    • Page-level settings
  • Writing content
    • Markdown basics
    • Rich media in Markdown
    • Fern Editor
    • Reusable snippets
  • AI features
    • Overview
    • Fern Writer
    • AI-generated examples
    • Markdown access
      • Overview
      • Customize LLM output
      • Agent directives
      • Analytics and integration
    • MCP server
    • API catalog discovery
  • Public API
    • GETJWT from Fern API key
    • GETAlgolia search credentials
    • GETCurrent user information
  • Fern Writer API
    • GETGet Fern Writer Install Link
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Add Markdown or MDX pages
  • Page header
  • Links in Markdown
  • Link format
  • Validating links
  • API link syntax
  • Link target
  • Tables
  • Fern components
Writing content

Markdown basics

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Page-level settings

Next

Rich media in Markdown

Learn how to use Markdown and MDX to add content to your documentation, including headers, components, and links.

Terminology

Throughout this documentation, “Markdown” refers to both Markdown and MDX. MDX is a version of Markdown, extended to allow the use of JSX components.

Add Markdown or MDX pages

Add pages manually to your documentation by creating Markdown (.md) or MDX (.mdx) files. New to Markdown? See Markdown Guide: Getting started.

Place your pages inside your fern/ folder and link to them from your navigation settings in the docs.yml file.

In the example below, the MDX files are inside a folder named pages/.

Example folder structure
$fern/
$├─ fern.config.json
$├─ docs.yml
$└─ pages/
$ ├─ welcome.mdx
$ └─ quickstart.mdx
docs.yml
1navigation:
2 - section: Overview
3 contents:
4 - page: Welcome
5 path: ./pages/welcome.mdx
6 - page: Quickstart
7 path: ./pages/quickstart.mdx

Page header

Fern automatically generates the <h1> page header for each page using the page value in docs.yml. For example, the following entry sets the page header for this page to “Markdown basics”:

docs.yml
1- page: Markdown basics
2 path: ./pages/component-library/writing-content/markdown-basics.mdx

Because the <h1> is generated automatically, you should begin your page content with <h2> headers instead of <h1>.

Links in Markdown

Link format

To link to another page on your docs site, write the destination’s published site path, starting with a /. Fern builds this path from the slugs in your docs.yml and product YAML files, not from the file’s location on disk. To link to a heading on another page, append #anchor to the path.

File-relative paths like ./ and ../ aren’t supported for inter-page links — use the published site path instead. (File-relative paths are still correct for images and other media and for path: references inside YAML config.)

Internal link example
1Learn about [how Fern SDKs work](/learn/sdks/overview/how-it-works).
2
3Configure [sidebar icons](/learn/docs/configuration/navigation#sidebar-icons) to add visual cues to your navigation.

In versioned docs, the same path lands on a different version depending on whether you write the unversioned form (default version) or the versioned form (e.g. /learn/docs/v2/getting-started). For inline version-specific content within a single page, use <If versions=…> or <Versions>.

Validating links

Fern provides two ways to catch broken links. The broken-links rule — run by fern check, including during fern docs dev — validates each internal link against the navigation tree built from your local YAML. To check links on a published site, use fern docs link check or the Fern Dashboard.

fern check broken-links rulefern docs link check
What it checksInternal links in your local YAML navigation treeAll links on your live deployed site
External linksNot checkedChecked
Requires a published siteNoYes
When to useIn CI, before publishingAfter publishing, to catch live 404s and broken external URLs

API link syntax

Use api: link syntax to link to API endpoints or API Reference sections in any Markdown content. Fern resolves these links at build time, so you don’t need to hardcode slugs.

Link to an endpoint

Use api:METHOD/path, where METHOD is an HTTP method (GET, POST, PUT, PATCH, DELETE) and /path is the endpoint path from your API definition. Path parameters use curly braces, such as api:GET/v2/payments/{paymentId}.

For projects with multiple APIs, prefix with the API name: api:API-NAME:METHOD/path.

Markdown
1View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint.
Link to the root of an API Reference section

Use api:apiName, where apiName matches the API name in your generators.yml file. This is useful when your project has multiple APIs and you want to link to the root landing page of a specific API Reference.

Markdown
1Explore the [Plant Store API](api:plant-store) reference.

Link target

Control where links open with the target property. Available for product, tab, navbar, and page links. For typical documentation sites, links can open in the same tab (_self) or new tab (_blank). For documentation embedded in a dashboard or iframe, links can open in the parent frame (_parent) or topmost frame (_top).

docs.yml
1navigation:
2 - section: Home
3 contents:
4 - page: Introduction
5 path: ./intro.mdx
6 - link: Our YouTube channel
7 href: https://www.youtube.com/
8 target: _blank

Learn more about links and other navigational elements.

Tables

Create tables using standard Markdown syntax with pipes (|) and hyphens (-):

1| Column 1 | Column 2 | Column 3 |
2|----------|----------|----------|
3| Row 1 | Data | Data |
4| Row 2 | Data | Data |

For more advanced table features like sticky headers for longer datasets, see the Table component documentation.

Fern components

Fern has a built-in component library you can use in Markdown. Explore the components.