# MdxGenerator

**Kind:** Class

**Source:** [`atloria-monorepo/apps/cli/src/generators/mdx.generator.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/cli/src/generators/mdx.generator.ts#L82)

MDX Generator class
Generates MDX documentation from entities

## Methods

| Method | Signature | Returns |
|---|---|---|
| `generate` | `generate()` | `Promise<void>` |
| `generateContent` | `generateContent()` | `Promise<{ pages: DocPage[]; navigation: NavItem[] }>` |

## Where it refuses work

- `MdxGenerator` stops the work with an early return when `deploymentDiagram.nodes.length > 0`.
- `MdxGenerator` stops the work with an early return when `diagram`.
- `MdxGenerator` stops the work with an early return when `!this.options.includeRelationships || relationships.length === 0`.
- `MdxGenerator` stops the work with an early return when `!name || typeof name !== 'string'`.
- `MdxGenerator` stops the work with an early return when `parts.length > 3`.

## When something fails

- `MdxGenerator` handles failure in 6 places: it turns it into a return value in all 6.
