Docs

Cards

Link onward with a list of cards instead of a paragraph of links.

Open Markdown

Opt-in. Enable it in build.rs before use — see Enabling below.

Cards are how a hub page hands off. They read faster than a "see also" paragraph and they survive scanning.

content/index.mdx
<Cards>
  <Card title="Quickstart" description="Running docs site in five minutes." href="/docs/proa-docs/quickstart" />
  <Card title="Code block" description="Highlighting, filenames, line marks, and copy controls." href="/docs/proa-docs/code-block" />
</Cards>

Rendered:

Attributes

AttributeRequiredMeaning
titleyesCard heading. Missing title fails the build
hrefyesDestination. Internal links are checked by link validation
descriptionnoOne line under the title

Each <Card /> is a single self-closing tag on its own line; any other non-blank line inside <Cards> fails the build. Cards have no bodies, so keep the description to a sentence.

Enabling

The MdxConfig::proa() preset enables this along with the other opt-in components. To turn on just this one:

build.rs
use proa_docs_build::{Config, MarkdownPipeline, MdxConfig};

let markdown = MarkdownPipeline::default().mdx(MdxConfig::new().cards(true));
let config = Config::new().source(source.markdown(markdown));

Where they earn their place

End a hub page with cards rather than prose. Fumadocs does this on every index page and it is the right call: a reader arriving at a section wants the menu, not a paragraph describing the menu.

Do not use them mid-page as a substitute for inline links.

Files · Navigation · Link validation

Search

Type at least 2 characters