Global Configuration
Customize your documentation using the docs.yml file
YAML Schema Validation
To enable intelligent YAML validation and autocompletion in your editor, add this line at the top of your docs.yml
file:
This enables real-time schema validation and autocompletion based on our complete schema.
Core configuration
Every Fern documentation website requires a docs.yml
file that contains the core configuration settings. Here are the essential top-level properties you can configure:
A string that is used as the tab bar title.
Learn more about the logo
configuration.
Relative filepath to the favicon.
Configure the primaryAccent
and background
colors. Learn more about the colors
configuration.
An array of paths you want to configure to permanently redirect to another path. Learn more about the
redirects
configuration.
Array of names and urls of links you want to include as a call to action. Learn more about the
navbar-links
configuration.
Set a custom background image to be displayed behind every page. Learn more about the
background-image
configuration.
Customize the fonts used in your documentation website. Learn more about the typography
configuration.
Customize the layout of your documentation website. Learn more about the
layout
configuration.
Creates a landing page for your documentation website. Learn more about the
landing-page
configuration.
Sets the default language displayed by code snippets in the API Reference.
Options include: typescript
, python
, java
, go
, ruby
, csharp
, curl
Configure SEO metadata for your documentation website. Learn more about the
metadata
configuration.
Instances configuration
An instance
is the backend of a distinct docs website. Each instance is published to a unique domain using the --instance
flag. It is most common to use instances to configure staging and production docs which publish to separate URLs.
Configure one or more documentation websites.
The URL where your Fern documentation is deployed. Must contain the suffix docs.buildwithfern.com
.
The custom domain where your documentation is hosted. Learn more about setting up a custom domain.
If specified, adds an “Edit this page” link to the bottom of each page that links to the given public GitHub repository. Learn more about the edit-this-page
configuration.
Colors configuration
The primary brand color used for interactive elements like links, buttons, and highlighted text. Configure separate colors for light and dark modes to ensure proper contrast and visibility.
The main background color for all documentation pages. Choose colors that provide good contrast with text and complement your brand colors. Dark mode colors should reduce eye strain.
Used for dividing lines, borders around elements, and visual separators. Choose subtle colors that create clear boundaries without being too prominent.
Background color for the navigation sidebar. When specified, includes a 1px border on the right side. If omitted, the sidebar uses a transparent background without a border.
Background color for the top navigation header. When specified, includes a 1px solid border on the bottom. If omitted, the header uses a transparent background with a subtle gradient border.
Background color for cards, code blocks, and other contained elements. Should be slightly different from the main background to create visual hierarchy while maintaining readability.
Logo configuration
The URL that users will be directed to when clicking the logo. Typically your company’s homepage or app.
Path to your dark mode logo file, relative to the docs root. SVG format is recommended for optimal quality. Example: assets/images/logo-dark.svg
Path to your light mode logo file, relative to the docs root. SVG format is recommended for optimal quality. Example: assets/images/logo-light.svg
Redirects configuration
The path that you want to redirect from.
The path that you want to redirect to.
Toggle between permanent and temporary redirect (default false
). When true, the status code is 308. When false the status code is 307.
NavBar links configuration
One of outlined
, minimal
, or filled
. This value controls the styling of the button.
The url once you click on the button. Example: https://buildwithfern.com/contact
Text inside the button.
When true
, the border radius of the button will be fully rounded.
The Font Awesome icon to be used in the button. This icon will appear to the left of the text content. Pro and Brand Icons from Font Awesome are supported.
The Font Awesome icon to be used in the button. This icon will appear to the right of the text content. Pro and Brand Icons from Font Awesome are supported.
By default, the rightIcon
for a filled
button is set to arrow-right
.
Background image configuration
Relative filepath to the light-mode background image.
Relative filepath to the dark-mode background image.
Typography configuration
The font used for all body text including paragraphs, lists, and general content. For optimal performance, use WOFF2 format.
The font used for headings, titles, and other prominent text elements. Can be the same as your body font if you prefer a unified look. Supports multiple weights for different heading levels.
The font used for code blocks and inline code. Monospace fonts are recommended for better code readability. Popular choices include JetBrains Mono, Fira Code, and Source Code Pro.
Font configuration
Single Weight
Variable Font
Multiple Files
The name of the font. Defaults to a generated name that will be used to reference your custom font in the eventually injected CSS.
The path to your font file, relative to your docs folder. Use this when you have a single font file. For multiple font files (like separate files for bold, italic etc), use paths
instead.
The weight of the font. Can be a number (400, 700) or a range for variable fonts (400 700). Common values: 400 (normal), 700 (bold).
The font style, either “normal” or “italic”. Defaults to “normal” if not specified.
A list of font files for particular weights. Each element in the list includes a path
, weight
, and style
property.
Layout configuration
Sets the height of the header. Defaults to 4rem
(64px
). Valid options are {number}rem
or {number}px
.
Sets the maximum width of the docs layout, including the sidebar and content. Defaults to 88rem
(1408px
).
Valid options are {number}rem
, {number}px
, or full
.
Sets the maximum width of the Markdown article content. Defaults to 44rem
(704px
).
Valid options are {number}rem
or {number}px
.
Sets the width of the sidebar in desktop mode. Defaults to 18rem
(288px
). Valid options are {number}rem
or {number}px
.
Sets the placement of the searchbar. Can be one of header
, sidebar
or header_tabs
(places the searchbar in the header but on the tabs row).
Defaults to sidebar
.
disable-header
is set to true.Set the placement of the tabs. Can be one of header
or sidebar
.
Defaults to sidebar
.
disable-header
is set to true.Set the alignment of the Markdown content. Can be one of center
or left
.
Defaults to center
.
If set to true, the header will not be rendered. Instead, the logo will be rendered as part of the sidebar, and a 1px border will separate the sidebar from the content.
GitHub configuration
Single Instance
Multiple Instances
The GitHub repository must be public for the “Edit this page” feature to work correctly.
The GitHub organization that owns the documentation repository.
The name of the GitHub repository containing your fern folder.
The branch of the repository you would like the GitHub editor to open a PR to. Default is main
.
Landing page configuration
The name of the landing page.
Relative filepath to the desired landing page Markdown file.
See Vapi’s landing page live and the associated Markdown file.
Metadata configuration
The name of your website for Open Graph tags.
The title shown in social media previews.
The description shown in social media previews.
The canonical URL of your documentation.
The image shown in social media previews. Recommended size is 1200x630 pixels.
The width of your Open Graph image in pixels.
The height of your Open Graph image in pixels.
The locale of your content (e.g., “en_US”).
URL to your company logo.
The title shown in Twitter Card previews.
The description shown in Twitter Card previews.
Your company’s Twitter handle.
The image shown in Twitter Card previews.
The Twitter handle for your website.
The Twitter Card type. Options are summary
, summary_large_image
, app
, or player
.
Analytics configuration
Your Google Analytics 4 measurement ID. Must start with “G-”.
Your Google Tag Manager container ID. Must start with “GTM-”.
Configuration for PostHog Analytics integration.
Your PostHog project API key. Defaults to the api-host of “https://us.i.posthog.com”.