Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

docs.yml reference

All of a site's configuration lives in docs.yml, with field names in kebab-case.

docs.yml is strictly validated on load: fields with the wrong type are reported as config/schema errors (with the field path), and unknown fields are kept but ignored. Run biti check after making changes to catch typos.

This site's own docs.yml (apps/docs/docs.yml in the repository) uses most of the fields here, so you can read it alongside this page: versions, two locales, tabs, API sections, the changelog, announcements, Ask AI, SEO, and custom CSS.

Sites on the hosted platform can skip the YAML: Docs settings on the site's Settings page in the dashboard opens the editor's settings panel, where you can change branding, header links, social links, the announcement bar, footer, layout, style, SEO, analytics, and redirects. Changes are written back to the same docs.yml (keeping your comments and formatting), published with a change request, and take effect on the next deployment.

Full example

docs.yml
title: Acme Docs
description: Official documentation for the Acme Payments API.
instances:
  - url: acme-payments-sites.butterix.com
    custom-domain: docs.acme.com

logo:
  light: assets/logo.svg
  dark: assets/logo-dark.svg
  height: 28
  right-text: Docs
favicon: assets/favicon.svg

colors:
  accent-primary:
    light: "#7C5CFF"
    dark: "#9E8AFF"
  background:
    dark: "#0F0E13"

typography:
  body-font:
    name: Inter
    path: assets/fonts/Inter-Variable.woff2

layout:
  page-width: 1440px
  content-width: 760px
  sidebar-width: 272px
  searchbar-placement: header
  tabs-placement: header

theme:
  default-mode: system

languages:
  - lang: zh
    default: true
  - lang: en

navbar-links:
  - type: minimal
    text: Support
    href: mailto:support@acme.com
  - type: github
    href: https://github.com/acme/acme
  - type: filled
    text: Dashboard
    href: https://dashboard.acme.com

tabs:
  guides:
    display-name: Guides
    icon: lucide:book-open
    slug: guides
  api:
    display-name: API Reference
    icon: lucide:code
    slug: api

navigation:
  - tab: guides
    layout:
      - section: Get started
        slug: start
        contents:
          - page: Introduction
            path: pages/introduction.mdx
            slug: introduction
  - tab: api
    layout:
      - api: API Reference
        api-name: acme
        openapi: openapi.yml
        skip-slug: true

redirects:
  - source: /docs/:page
    destination: /guides/start/:page

announcement:
  message: The new API is live
  href: /changelog

ai:
  suggestions: [How do I create a payment?, How do I verify a webhook signature?]

seo:
  title-template: "{page} | {site}"
  ai-crawlers: allow

css: assets/custom.css

footer:
  text: © 2026 Acme, Inc.
  socials:
    github: https://github.com/acme

Site info

titlestringDefault Documentation

The site name. Shown in the header (when there's no logo), the browser title, og:site_name, the top-level heading of llms.txt, and the MCP server name.

descriptionstring

The site description. Used for the home page's <meta name="description" /> (when the page has no description of its own), the llms.txt summary (when agents.llms-txt.description isn't set), and the MCP server description.

instances{ url, custom-domain? }[]

Where the site is deployed. The first entry determines two things:

  • Path prefix: when basepath isn't set, it's inferred from the path of custom-domain, e.g. acme.com/docs → /docs.
  • Default site identifier: when biti deploy, biti pull, or biti export is run without --site, the site subdomain is inferred from the hostname of url, e.g. acme-payments-sites.butterix.com → acme-payments.
urlstring

Shorthand equivalent to instances[0].url; ignored when instances is present.

basepathstring

Set this when the site is deployed under a subpath, e.g. /docs. Every page, asset, and llms.txt gets this prefix. When unset, it's inferred from the path part of instances[0] (or url): example.com/docs → /docs.

Branding: logo, favicon, and colors

faviconstring

The browser tab icon. Supports SVG, PNG, and ICO.

background-imagestring | { light, dark }

A page background image that covers the viewport and stays fixed behind the content. A single path applies to both modes; with { light, dark } each applies to its own mode, so setting only dark shows it in dark mode only. Paths are relative to the directory containing docs.yml, or a full https URL. When set, cards, code blocks, accordions and similar elements turn into translucent frosted glass so the background shows through. For a hero image on a single page, use the page's background-image.

background-image:
  light: assets/bg-light.png
  dark: assets/bg-dark.png
colorsobject

Theme colors. Each value can be a single color string (shared by both modes) or { light, dark }. ButterIX generates a 12-step palette from the accent color in the OKLCH color space and automatically ensures text contrast.

colors fields
colors.accent-primarycolor
Accent color: links, buttons, selected states, badges. colors.primary also works.
colors.backgroundcolor
Page background color.
colors.bordercolor
Border color.
colors.sidebar-backgroundcolor
Sidebar background color.
colors.header-backgroundcolor
Header background color.
colors.card-backgroundcolor
Card background color.
colors:
  accent-primary: "#0EA5E9"        # Same in light and dark mode
  background:
    light: "#FFFFFF"
    dark: "#0B0B0F"

Fonts

typographyobject

Three fonts for body, headings, and code: body-font, heading-font, and code-font. A plain name uses Google Fonts; for your own files, write { name, path?, paths? }. You can also upload them in the editor under Docs settings → Brand.

  • path: a single font file (WOFF2, WOFF, TTF or OTF), taken as a variable font that covers every weight; for a file with one weight, use paths and give its weight.
  • paths: multiple files; each entry can be a path string or { path, weight, style } (e.g. per-weight files instead of a variable font).
  • Paths relative to the project root are copied into the output; URLs starting with http(s):// are referenced as-is.
typography:
  body-font:
    name: Source Han Sans
    paths:
      - path: assets/fonts/SourceHanSans-Regular.woff2
        weight: 400
      - path: assets/fonts/SourceHanSans-Bold.woff2
        weight: 700
  code-font:
    name: JetBrains Mono
    path: assets/fonts/JetBrainsMono.woff2

Layout

layoutobject

Page dimensions and component placement.

layout fields
layout.page-widthstring
Maximum width of the whole page, e.g. 1440px; full is the wide-screen mode: the sidebar hugs the left edge, the table of contents the right edge, and the content sits in between.
layout.content-widthstring
Width of the content column, e.g. 760px.
layout.sidebar-widthstring
Sidebar width, e.g. 272px.
layout.header-heightstring
Header height.
layout.header-opacitynumber | stringDefault 100%
Opacity of the header background, as 0.7 or 70%. Below 100%, content scrolling underneath shows through the header (on a page hero image it defaults to 70%). The header color itself comes from colors.header-background.
layout.header-blurnumber | stringDefault 16
Blur radius, in pixels, applied to whatever shows through a translucent header. 0 turns it off.
layout.searchbar-placement"header" | "sidebar" | "header-tabs"Default header
Whether the search bar goes in the header, at the top of the sidebar, or at the right end of the tab bar. Without a tab bar, header-tabs is the same as header.
layout.tabs-placement"header" | "sidebar"Default header
Whether tabs appear below the header or as a list at the top of the sidebar.
layout.content-alignment"center" | "left"Default center
Whether the content column is centered on the page or aligned left against the sidebar.

Theme

theme.default-mode"light" | "dark" | "system"Default system

The color mode on first visit. The reader's choice after switching is saved in the browser.

theme.dark-modebooleanDefault true

Set to false to hide the light/dark mode toggle in the header.

theme.codestringDefault default

Code colors, each with a light and a dark side: default, github, one, catppuccin, rose-pine, vitesse, everforest, gruvbox, solarized, night-owl. A single code block can use another one with theme="…"; see Code blocks.

theme.page-actionsstring[]

Which actions appear under the page title. Buttons: ask-ai, copy-page, view-as-markdown, more (every entry of the More menu). To keep only some menu entries, list their ids instead: chatgpt, claude, claude-code, cursor, vscode, copy-mcp, print. All are shown by default; use [none] to hide them all.

code-languagesstring[]

Languages and order of code samples on API reference pages, e.g. [curl, typescript, python, go]. Individual endpoints can override it.

api-referenceobject

How endpoint pages look: layout, examples-width, content-width, try-it, request-examples, response-examples, errors, and endpoints to override single endpoints. See Adjust how endpoint pages look.

You can add, reorder, and remove header links under Docs settings → Header and footer in the dashboard. How the three styles map to config values:

DashboardtypeLook
ButtonfilledSolid accent-colored button, placed at the far right
OutlinedoutlinedButton with a border
TextminimalPlain text link
navbar-links:
  - type: minimal
    text: Status
    href: https://status.acme.com
    icon: lucide:activity
  - type: github
    href: https://github.com/acme/acme
  - type: filled
    text: Sign up free
    href: https://dashboard.acme.com/signup
    right-icon: lucide:arrow-right
sidebar-links:
  - text: Community
    href: https://discord.gg/acme
    icon: fa-brands fa-discord
  - text: Roadmap
    href: /roadmap
    icon: lucide:map
    color: "#10b981"

You can also add, reorder and delete them in the console under Docs settings → Header & footer.

Tabs and navigation

tabsRecord<string, Tab>

Declares tabs. The key is the tab id, referenced in navigation with - tab: <id>. Version or product files can also have their own tabs, which are merged with these.

Tab fields
display-namestringRequired
Display name; translated through labels.yml in non-default locales.
iconstring
Icon.
icon-styleplain | tileDefault plain
Icon style when tabs are shown in the sidebar; see Icon style.
slugstring
URL segment; generated from display-name by default.
skip-slugboolean
Don't add a URL segment for this tab.
hrefstring
Turns the tab into an external link.
hiddenboolean
Don't show it in the header (pages remain accessible).
navigationNavItem[] | { tab, layout }[]

The sidebar navigation. It can be a plain list of nodes (no tabs) or a list of { tab, layout } (one tree per tab). Node types are section, page, link, folder, api, and changelog; see Navigation. When versions or products are configured, navigation lives in their respective files and this navigation is no longer used.

landing-page{ page, path, slug? }

An extra landing page mounted at slug under basepath (the root / by default), which becomes the site's home page. It doesn't appear in the sidebar, making it a good fit for a marketing-style home page (together with the page's layout: custom).

Versions and products

versionsVersion[]

Multiple versions of the docs. The first version is the default and has no URL prefix; other versions use a /<slug> prefix.

Version fields
display-namestringRequired
Name in the version selector.
pathstringRequired
The navigation file for this version, of the form { tabs?, navigation }.
slugstring
URL segment and version id; generated from display-name by default.
availabilitystable | ga | beta | deprecated
Status label shown in the selector.
hiddenboolean
Not listed in the selector (pages remain accessible).
productsProduct[]

Multiple products under one site. Each product has its own navigation, and a product selector appears in the header. Fields: display-name (required), path (navigation file), href (link directly to an external site), slug, subtitle, icon, image, and versions (the product's own version list, same format as above).

products:
  - display-name: Payments API
    slug: payments
    subtitle: Payments, refunds, and reconciliation
    icon: lucide:credit-card
    versions:
      - display-name: v2
        path: products/payments/v2.yml
      - display-name: v1
        path: products/payments/v1.yml
  - display-name: Mobile SDK
    slug: sdk
    path: products/sdk.yml
  - display-name: Status
    href: https://status.acme.com

See Versions for details.

changelogstring | { changelog, title?, slug?, icon? }

A changelog shared by every product of a multi-product site, at a URL without a product prefix (/changelog by default) and not listed in the product switcher. Only valid together with products. See Changelog for the syntax, the blog: alias, and how the page looks.

Locales

languages{ lang, default?, source?, display-name? }[]

The locales the site supports. The locale with default: true (or the first entry if none is marked) is the default locale and has no URL prefix; other locales use a /<lang> prefix. The locale with source: true (or the default locale if none is marked) is the source locale, the one pages/ and the text in docs.yml are written in; translations for other locales go under translations/<lang>/. See Default language other than the source. display-name is the name in the locale switcher and defaults to a built-in name (such as "简体中文" or "English"). translations: also works. Arabic, Hebrew, Persian, and similar languages automatically use right-to-left layout.

languages:
  - lang: zh
    default: true
  - lang: en
  - lang: ja

See Internationalization for details.

Redirects

redirects{ source, destination, permanent? }[]

Maps old URLs to new ones. permanent defaults to true (301); set it to false for 302.

  • source supports :name parameters and the * wildcard, referenced in destination as :name and :splat.
  • A redirect only fires when there's no real page at the target path.
redirects:
  - source: /docs
    destination: /guides/get-started/introduction
  - source: /v1/:page
    destination: /guides/:page
  - source: /blog/*
    destination: https://blog.acme.com/:splat
    permanent: false

Announcement bar

announcement{ message, href?, background?, color? }

A notice bar shown above the header that readers can dismiss (dismissal is remembered per message, so it reappears when the message changes). message supports inline Markdown; when href is set, an arrow link is shown at the end.

announcement fields
announcement.backgroundstring | { light, dark }
The bar's background: a color, a CSS gradient, or an image path / URL (scaled to cover). Can be set separately for light and dark mode. Defaults to the accent color.
announcement.colorstring | { light, dark }
Text color. Set it when the background is light or an image, so the text stays readable.
announcement:
  message: "**v2** is out: see what's new"
  href: /changelog
  background:
    light: "linear-gradient(90deg, #7c3aed, #db2777)"
    dark: assets/announcement-dark.webp
  color: "#ffffff"

In YAML, anything after # is a comment, so quote gradients that contain hex colors. An invalid color or gradient is ignored and the bar falls back to the accent color. To change the font size, padding and so on, style .bd-announcement in custom CSS.

Analytics

analyticsobject

Third-party analytics scripts. When configured, the corresponding script is injected into every page and page views are reported on client-side navigation. They aren't injected in preview deployments or the editor preview.

Supported services
analytics.ga4.measurement-idstring
Google Analytics 4, e.g. G-XXXXXXX.
analytics.gtm.container-idstring
Google Tag Manager, e.g. GTM-XXXX.
analytics.plausible{ domain, src? }
Plausible; src can point to a Plausible script you host yourself.
analytics.posthog{ api-key, endpoint? }
PostHog; endpoint defaults to https://us.i.posthog.com.
analytics.segment.write-keystring
Segment.
analytics.mixpanel.tokenstring
Mixpanel project token; page views are tracked automatically.

The hosted platform includes built-in analytics that distinguish human and AI traffic, with no configuration needed. See Analytics.

Ask AI

aiobject

Content-side configuration for the site's AI Q&A. The provider, model, and keys are set in the hosted platform's dashboard (see Ask AI).

ai fields
ai.enabledbooleanDefault true
Set to false to turn off Ask AI for this site (the runtime also rejects requests).
ai.greetingstring
Welcome message in the chat panel.
ai.suggestionsstring[]
Suggested questions in the chat panel.
ai.system-promptstring
Guidance appended to the system prompt, such as tone, product names to emphasize, or topics not to answer.
ai.disclaimerstring
Notice at the top of the panel, in place of the built-in "AI answers may be inaccurate. Check the cited sources."
ai.mask-piiboolean | string[]
Hide personal data and secrets in questions before they're sent: true for every kind, or a list of email, phone, id-number, bank-card, secret. See Hide personal data and secrets.

Page review

page-reviewobject

The review period of pages, and whether readers see it. For the fields of a page, see Page review.

page-review fields
page-review.everystring
Default review period, such as 180d or 6m.
page-review.showbooleanDefault false
Show the verification date at the bottom of pages.

Page feedback

feedback.enabledbooleanDefault true

Shows "Was this page helpful?" at the bottom of pages on hosted sites. Individual pages can turn it off with the frontmatter hide-feedback: true.

While it is on, code blocks in the text also get Report a problem with this code, and AI tools can send feedback too; see Analytics. Turning it off turns these off as well.

SEO

seoobject
seo fields
seo.title-templatestringDefault {page} | {site}
Template for the page <title>, where {page} is the page title and {site} is the site name. When the home page title equals the site name, only the site name is shown.
seo.og-imagestring
Default social sharing image (pages can override it with the frontmatter og:image).
seo.twitter-handlestring
Output as twitter:site.
seo.noindexboolean
Keep the whole site out of indexes: every page gets noindex, and robots.txt disallows crawling.
seo.ai-crawlers"allow" | "disallow"Default allow
Set to disallow to block AI training and retrieval crawlers such as GPTBot, ClaudeBot, PerplexityBot, Google-Extended, and CCBot in robots.txt.
seo.content-signalobject
Declares what content may be used for in robots.txt: search, ai-input, ai-train, each a boolean; ones left out aren't output.

See SEO for details.

Agents

agents.llms-txt.descriptionstring

The summary (blockquote) at the top of llms.txt. Falls back to the site description when unset.

agents.page-directivestring

Instructions (a blockquote, one or more lines) at the top of every page's Markdown version (.md). Only AI agents see them; they don't appear on the web page. When unset, the built-in directive is used; an empty string leaves it out.

agents.mcpbooleanDefault true

Set to false to turn off the site's MCP server.

agents.robots-txtstring

A file to publish as robots.txt, relative to docs.yml. Preview deployments and sites with seo.noindex don't use it and always disallow crawling. A missing file gives a config/robots-txt warning.

See Agent-friendly for details.

Custom CSS and JS

cssstring | string[]

Extra stylesheets, loaded after the theme styles so they can override anything. Paths are relative to the project root.

jsstring | { path | url, strategy? } | (string | { path | url, strategy? })[]

Extra scripts. Give a path (relative to the project root) or a url (http or https), and optionally a strategy for when it loads:

  • afterInteractive (default): loaded with <script defer> and run once the page is parsed.
  • beforeInteractive: runs synchronously in <head>, before the page renders. Use it only for scripts that must run first; it slows down the first paint.
  • lazyOnload: loaded after the page has finished loading, when the browser is idle. Good for chat widgets, analytics and anything else that isn't urgent.

For security, the visual editor preview doesn't load them.

css:
  - assets/brand.css
js:
  - assets/widget.js
  - path: assets/consent.js
    strategy: beforeInteractive
  - url: https://cdn.example.com/chat.js
    strategy: lazyOnload

Styling components with CSS

Theme class names all start with bd- and stay stable, so you can rely on them in custom CSS. Prefer theme variables for colors (such as --bd-accent, --bd-gray-a3 and --bd-card-bg) so light and dark mode adapt automatically; when you need separate values, put the dark ones under .dark.

ClassWhere
.bd-header, .bd-announcementThe header and the notice bar above it
.bd-sidebar, .bd-tocLeft navigation, right table of contents
.bd-prosePage content
.bd-card, .bd-card__title, .bd-card__contentCards, their titles and body
.bd-callout, .bd-accordion, .bd-steps, .bd-codeCallouts, accordions, steps, code blocks
.bd-footer, .bd-footer__column, .bd-footer__linkThe footer, its columns and links

Most components also accept className, so you can style just a few instances. This example gives cards with className="feature" a gradient background and a purple accent bar along the bottom:

assets/brand.css
.bd-card.feature {
  overflow: hidden;
  background: linear-gradient(180deg, var(--bd-card-bg), color-mix(in srgb, #7c3aed 6%, var(--bd-card-bg)));
}
.bd-card.feature::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: #7c3aed;
  transition: height 150ms ease;
}
.bd-card.feature:hover::after { height: 6px; }
<Card title="Quickstart" href="/quickstart" className="feature">Publish your first site in five minutes.</Card>

Page events

Moving between pages doesn't reload the page, so scripts only run when the site is first opened. To do something on every page or when search opens (analytics, a chat widget, buttons on code blocks), listen to these events on document:

EventWhenevent.detail
bd:pageA page is shown and its content is ready: on first load and on every move to another pageurl, path, title, locale, kind (markdown, endpoint, changelog and so on), first (whether it is the first page)
bd:searchSearch opens or closesopen
bd:askAsk AI opens or closesopen
bd:themeThe reader switches between light and darktheme (light or dark)
assets/widget.js
document.addEventListener("bd:page", (e) => {
  window.myAnalytics?.track("page", { path: e.detail.path, first: e.detail.first });
});

Scripts with afterInteractive (the default) or beforeInteractive receive bd:page for the first page; by the time a lazyOnload script loads, the first page is already shown, so read the current address instead.

Custom scripts run on your docs domain and can read and modify anything on the page. Only include code you trust. MDX page content itself can't contain scripts; see Safe subset.

footer:
  text: © 2026 Acme, Inc.
  links:
    - text: Privacy
      href: /legal/privacy
  socials:
    github: https://github.com/acme
    x: https://x.com/acme
    discord: https://discord.gg/acme

When the default footer's structure isn't enough (a multi-column brand blurb, a newsletter sign-up, a wall of compliance badges), write the whole footer as an MDX file:

footer: ./footer.mdx
footer.mdx
<Columns widths="2 1 1">
  <Column>
    ![Acme](./assets/logo.svg)

    Payments infrastructure for developers.
  </Column>
  <Column>
    **Product**

    [Pricing](/pricing) · [Changelog](/changelog)
  </Column>
  <Column>
    **Company**

    [About](https://acme.dev/about) · [Privacy](/legal/privacy)
  </Column>
</Columns>

The footer file uses the same safe MDX subset and built-in components as any page. Relative paths resolve from the footer file's own location, and you can adjust its styles in custom CSS with .bd-footer--custom.

The footer file must be .md / .mdx: for security, the platform doesn't run component code from authors, so a .tsx / .jsx footer produces a build warning and the default footer is shown. Common layouts can all be built from Columns, Card, images and links.

Powered by badge

A small "Powered by ButterIX" badge appears at the top of the footer, in place of the site logo; when no footer is configured, it sits alone in a slim footer bar. Sites hosted on ButterIX show it by default. To remove it, ask the platform administrator to enable this for your organization; you can then turn it off under Docs settings → Header and footer in the editor, or in docs.yml:

powered-by: false

Until it's enabled for your organization, this setting has no effect. Changes apply from the next deployment.

Edit this page

edit-this-page.github{ owner, repo, branch?, path? }

Shows an "Edit on GitHub" link at the bottom of pages. branch defaults to main; use path to specify a subdirectory when the docs aren't at the repository root. Translated pages link to the original file.

edit-this-page:
  github:
    owner: acme
    repo: docs
    branch: main
    path: docs

Accepted but not yet used fields

The following fields can be written (they pass validation without errors), but the current version doesn't use them when rendering:

FieldDescription
layout.disable-headerHiding the header
theme.sidebarSidebar style
typography.*.url, typography.*.weightRemote font stylesheets; use path / paths instead
default-languageDefault language for API code samples (use code-languages for the order)