The `ruby` feature adds phonetic ruby annotations for CJK text, rendering an inline syntax to standard HTML `<ruby>` markup.

:::note[Requires zfb 0.1.0-next.14 or newer]

The `{base}^{ruby}` syntax 500'd the SSR render at zfb `0.1.0-next.13` ([#1815](https://github.com/zudolab/zudo-doc/issues/1815)). It is fixed in zfb `0.1.0-next.14` (upstream Takazudo/zudo-front-builder#600) and is now enabled in zudo-doc's `zfb.config.ts` — the live example below is rendered by the running pipeline.

:::

## Configuration

:::note[Included in the standard preset]

`zudoDoc()` enables Ruby. No separate configuration field is necessary:

```ts title="zfb.config.ts"
import { defineConfig } from "zfb/config";
import { zudoDoc } from "@takazudo/zudo-doc/config";

export default defineConfig(
  zudoDoc({
    siteName: "My Docs",
  }),
);
```

A bare `defineConfig({ markdown: { features: { ruby: true } } })` discards the rest of the preset (githubAlerts, codeTabs, tocExport, and more) — use `zudoDoc({...})` instead.

:::

## Syntax

The annotation uses a caret followed by the reading in braces, written immediately after the base text — `{base}^{ruby}`. The base is the run of characters directly preceding the caret:

```md
日本語^{にほんご}
```

## Live example

The source above, rendered by this page's pipeline:

日本語^{にほんご}

## HTML output

The annotation is rendered as semantic `<ruby>` markup:

```html
<ruby><rb>日本語</rb><rt>にほんご</rt></ruby>
```

## Scope

The feature parses only the explicit `{base}^{ruby}` syntax. It does not perform automatic kanji detection or morphological analysis to assign furigana — that is intentionally out of scope. The base is taken greedily from the contiguous characters before the caret, so separate the base from preceding text with a delimiter when you need a narrower annotation.