Configure your site navigation
Every Fern Docs website has a special configuration file called docs.yml. Use this file to configure the navigation for your documentation site.
Here’s a complete example of a docs.yml file:
Sections, pages, and folders
Build your navigation by combining sections, pages, and folders.
API Reference section
Use the special api key to create an automatically generated API Reference section. For more information, see Generate API Reference.
Add a section
Sections organize your documentation in the left-side nav bar. Each section has a name and a list of contents, which can include pages, folders, or nested sections.
Sections can be nested to create multi-level navigation hierarchies.

To add an overview page to a section, add a path property pointing to an .mdx file.
Add a page
Create an .md or .mdx file, then add a page entry to a section’s contents with the file path.
Add a folder
Add a folder entry pointing to a directory. Fern auto-discovers all .md and .mdx files and adds them to the navigation.
For the pages in a folder, Fern automatically:
- Converts filenames to titles and URL slugs
- Creates nested sections from subdirectories
- Sorts pages alphabetically
- Uses
index.mdxorindex.mdfiles as section overview pages (case-insensitive)
Folder configuration options
Customize folder behavior with these options:
title
The title to display for this folder section. If not provided, the folder name is used.
title-source
Determines how page and section titles with the folder are derived. By default (filename), titles are derived from file names. Set to frontmatter to use the title field from each file’s frontmatter instead (falls back to filename if not set).
slug
Overrides the auto-generated URL slug for the folder.
skip-slug
Omits the folder from the URL path, so pages appear at the parent level.
position
Set in page frontmatter to control ordering within the folder. Pages with position appear first (sorted numerically), followed by the rest alphabetically.
Hiding content
To hide a page, folder, or section, add hidden: true. Hidden content (including all pages within a folder) is still accessible via direct URL but is excluded from search and won’t be indexed.
Availability
Set availability badges on pages, sections, or folders. Options are: stable, generally-available, in-development, pre-release, deprecated, or beta.
Pages inherit availability from their parent section or folder unless overridden by:
- A per-page
availabilitysetting indocs.yml(shown below) - Page frontmatter availability, which takes precedence over all
docs.ymlavailability
If you have different versions of your docs, section, folder, and page availability should be set in the .yml files that define the navigational structure for each version.
Collapsed sections or folders
You can set sections or folders to be collapsed by default when the page loads by adding collapsed: true.
This helps keep the navigation tidy when you have many sections or want to highlight the most important sections by keeping others collapsed.
Sidebar icons
Add icons next to sections, pages, and folders using the icon key.
Icons can be in three formats:
- Font Awesome icons: Use icon names like
fa-solid fa-rocket. Pro and Brand Icons from Font Awesome are supported. - Custom image files: Use relative paths to image files (e.g.,
./assets/icons/my-icon.svgor../assets/icons/my-icon.png). Paths are relative to thedocs.ymlfile. - Inline SVG: Provide an SVG string wrapped in quotes (e.g.,
"<svg>...</svg>").
Links
You can add a link to an external page within your sidebar navigation with the following configuration:

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).
Tabs
You can add tabs to group sections of content together. Tabs can contain different layouts and navigation structures, and you can use tab variants to show different content variations within a single tab. For more information, see Tabs and tab variants.
Versions
If you have multiple versions of your documentation, you can introduce a dropdown version selector by specifying the versions. For more information, check out the documentation on versioning.
Product switching
If you have multiple products in your documentation, you can introduce a dropdown product selector by creating separate product configuration files. Each product can contain its own distinct versions, tabs, sections, pages, and API References, though products can also share content. For more information, see Product switching.