Capsa

Documentation
API Reference
Changelog
guides/Writing Content

Writing Content

Pages are .mdx: standard Markdown plus React components when you want them. This page is both the reference and a live demo of everything available.

Frontmatter

Optional YAML at the top of a file controls metadata:

YAML
---
title: Writing Content       # overrides the filename-derived title
description: ...              # search snippets + SEO meta + social cards
order: 1                      # sort order within the sidebar group
hidden: true                 # draft — excluded from nav, search, and sitemap
product: acme                 # scopes the page to a product (see configuration)
---

Callouts

Write :::note, :::tip, :::warning, or :::danger. An optional [Title] overrides the label.

Note

Callouts use the theme's semantic tokens, so they re-color per theme and in light/dark automatically.

Heads up

Wrap a label in brackets to set a custom title.

Code blocks

Fenced code gets a language label, a copy button, and an optional filename via the title= meta:

TypeScript
export function greet(name: string) {
  return `Hello, ${name}`;
}

Code tabs

Wrap multiple fenced blocks in <CodeTabs>; the chosen language persists across every code-tab group on the site:

curl https://api.example.com/v1/widgets

API method references

Use <ApiMethod> inline to link prose to the API reference:

POST

/v1/widgets

Create a widget

GET

/v1/widgets/{id}

Fetch a widget

See-also cards

<SeeAlso> wraps a Markdown link list in a discovery card:

Tables

Standard Markdown tables scroll horizontally on small screens:

ComponentUse it for
CodeTabsMulti-language code samples
CalloutNotes, tips, warnings, dangers
ApiMethodInline endpoint references
SeeAlsoRelated-page discovery cards
Was this page helpful?
© Capsa