Skip to content

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

Markdown basics

Pages use MDX — standard Markdown (with GFM extensions) plus components. This page lists all supported syntax and how it renders.

Page files can be .mdx or .md. Both are parsed as MDX; when a .md file fails to parse, it automatically falls back to plain Markdown, which makes migrating old docs straightforward.

Headings

## Level 2 heading
### Level 3 heading
#### Level 4 heading {#custom-anchor}
  • The page heading comes from the frontmatter title; the body starts at ##.
  • Every heading automatically gets an anchor (using the same algorithm as GitHub), and a link icon appears to its left on hover.
  • Write {#custom-id} at the end of the line to set the anchor explicitly, so old links keep working after the heading is reworded.
  • ## through #### appear in the "On this page" table of contents on the right; adjust the depth with the frontmatter max-toc-depth.

This heading uses a custom anchor

The heading above lives at #custom-anchor-demo.

Text styles

SyntaxResult
**Bold**Bold
*Italic*Italic
~~Strikethrough~~Strikethrough
`inline code`inline code
<kbd>Ctrl</kbd> + <kbd>K</kbd>Ctrl + K
<mark>Highlight</mark>Highlight
H<sub>2</sub>O, x<sup>2</sup>H2O, x2
[Internal page (source file path recommended)](../configuration/navigation.mdx)
[With an anchor](../configuration/navigation.mdx#slug-rules)
[Internal URL](/guides/get-started/quickstart)
[External link](https://commonmark.org)
  • Linking to source files (.mdx paths) is recommended. The builder replaces them with the target page's URL in the current locale and version; when the target doesn't exist, biti check reports link/broken.
  • External links automatically open in a new tab and get a ↗ icon: CommonMark spec.
  • Internal URLs starting with / stay in the current locale and version: /llms.txt on an English page points to /en/llms.txt, and /guides/x on a v0 page to /v0/guides/x. When the target doesn't exist there, the default version and then the URL as written are used; see Links and images.
  • MDX doesn't support autolinks of the form <https://…> (the < is treated as a tag); write [text](url) instead. GFM's bare URL autolinking still works.

Lists

- Unordered list
  - Nested item
1. Ordered list
2. Second item
   1. Nested number
  • Unordered list
    • Nested item
  1. Ordered list
  2. Second item
    1. Nested number

Task lists

- [x] Write docs.yml
- [x] Add the first page
- [ ] Configure a custom domain
  • Write docs.yml
  • Add the first page
  • Configure a custom domain

Tables

GFM tables support left / center / right alignment. Column widths are estimated from each column's content: columns with the same content always get the same width, and long-text columns get more room. When there are too many columns to fit, the table grows wider than the page column and scrolls horizontally, with shadows on the edges hinting that there is more to see. Use <Table> to set column widths, a minimum width or a sticky header.

| Error | Meaning | Status |
|:---|:---:|---:|
| `unauthorized` | Missing or invalid API key | 401 |
| `not_found` | Resource not found | 404 |
ErrorMeaningStatus
unauthorizedMissing or invalid API key401
not_foundResource not found404

Merged cells

A cell written as |>>| continues the cell on its left (column span); |^^| continues the cell above (row span, table body only). Write at least two of the character, touching the pipes on both sides, with no spaces or anything else.

| Font | Simplified | Traditional | Japanese |
|---|:---:|:---:|:---:|
| Noto Sans CJK | ✓ | ✓ | ✓ |
| MiSans | ✓ | ✓ | – |
|^^| MiSans L3 covers rare characters |>>|>>|
| LINE Seed | – | ✓ | ✓ |
FontSimplifiedTraditionalJapanese
Noto Sans CJK✓✓✓
MiSans✓✓–
MiSans L3 covers rare characters
LINE Seed–✓✓

To show only these characters in a cell, put a backslash in front:

| Operator | Meaning |
|---|---|
| \> | Greater than |
| \>> | Right shift |
| \^ | Exclusive or |
OperatorMeaning
>Greater than
>>Right shift
^Exclusive or
Formatters such as Prettier add spaces next to the pipes, which undoes the merge. Put {/* prettier-ignore */} on its own line before a table with merged cells, with a blank line between, or exclude those files from formatting. biti check points out >> and ^^ with spaces around them.

For more complex merges (such as multi-row headers), write an HTML <table> directly — colspan and rowspan work, and it gets the same styling and horizontal scrolling as Markdown tables.

Blockquotes and dividers

Documentation is part of the product.

— Every engineer who has ever written API docs


For prominent notices, use a callout component instead of a blockquote:

Blockquotes are for quotations; for tips and warnings, use components like <Note> and <Warning>.

Footnotes

ButterIX uses Pagefind for site search[^1].

[^1]: Pagefind is a static search library that runs in the browser.

ButterIX uses Pagefind for site search1.

Collapsible content

A native <details> automatically gets the accordion look:

Why not just use <Accordion>?

Both render the same result. <details> is standard HTML and works in any Markdown renderer; <Accordion> also supports icons, descriptions, and opening by default.

HTML elements

You can use lowercase HTML tags in MDX, but only elements and attributes on a safe allowlist:

  • Allowed: div, span, p, a, img, video, audio, iframe, the table family, details / summary, kbd, mark, sub / sup, figure, svg and its graphics elements, and more.
  • Link and resource URLs are checked for protocol, and things like javascript: are removed; no on* event attributes are ever output.
  • style can be a string or an object; dangerous CSS (such as expression()) is filtered out.
  • Tags not on the allowlist (such as script, style, form, button) are removed with an mdx/tag warning.
<div style={{ display: "flex", gap: 8 }}>
  <img src="/assets/favicon.svg" width="32" height="32" alt="" />
  <span>Inline HTML layout</span>
</div>

Inline HTML layout

Comments

{/* MDX comment: doesn't appear on the page or in the Markdown version */}
<!-- HTML comments work too and are converted automatically -->

Escaping

{ and < have special meaning in MDX. To show them literally in body text:

To showWrite
{ and }\{ and \}, or put them in inline code
<&lt;, or put it in inline code
A piece of code containing themUse a code block or inline code; its content isn't parsed

When parsing fails, biti check reports an mdx/parse error with a line number; the cause is usually an "unclosed tag" or an "unescaped { / <".

Footnotes

  1. Pagefind is a static search library that runs in the browser; its index is generated at build time. ↩︎