Skip to content

nisabmohd/aria-docs / skills/ariadocs-mdx

ariadocs-mdx

Verified

Add MDX documentation pages to a React app with @ariadocs/mdx — read a folder of .mdx files, render pages (Server Components or client), frontmatter, table of contents, sidebar navigation from _meta.json, static paths, remark/rehype plugins, custom MDX components and untrusted MDX. Use when the user wants to set up docs pages, render MDX files or MDX from a CMS, build a docs sidebar or TOC, or migrate from @ariadocs/react. Covers Next.js (App and Pages Router), React Router (v7 and v8) and TanStack Start. For the UI (layout, sidebar, callouts) use the `ariadocs-components` skill; for API references use `ariadocs-openapi`.

FileKindSize
SKILL.mdskill md5.8 KB
references/api.mdmarkdown1.6 KB
references/frameworks.mdmarkdown10.1 KB
references/migration.mdmarkdown1.8 KB

references/migration.md

View on GitHub
# Migrating from @ariadocs/react

```bash
pnpm remove @ariadocs/react
pnpm add @ariadocs/mdx @ariadocs/components
```

Then search the project for `@ariadocs/react` and apply the renames below.

| Before | After |
| --- | --- |
| `@ariadocs/react` | `@ariadocs/mdx` |
| `@ariadocs/react/client`, `/server`, `/plugins` | `@ariadocs/mdx/client`, `/server`, `/plugins` |
| `@ariadocs/react/styles/*.css` | `@ariadocs/components/styles/syntax/*.css` |
| `mdxComponents` option | `components` |
| `docs.readMdx()` | `docs.read()` |
| `docs.getNavItems()` | `docs.getNavigation()` |
| `parseMdxRemote({ raw })` | `parseMdx({ source })` |
| `serializeMdxRemote({ raw })` | `serializeMdx({ source })` |
| `getFrontmatterRemote`, `getTocRemote` | `getFrontmatter({ source })`, `getToc({ source })` |
| result field `raw` | `source` |
| `<MdxServer raw options={{ ... }} />` | `<MdxServer source remarkPlugins rehypePlugins />` |
| `<MdxClient mdxComponents />` | `<MdxClient components />` |
| `ParseResult`, `SerializeResult` | `ParseMdxResult`, `SerializeMdxResult` |

## Behavior to check after migrating

- `index.mdx` maps to its folder. `getPagePaths()` returns `"/"` and `"/guides"` instead of `"/index"` and `"/guides/index"`. Update `generateStaticParams`, prerender lists and links.
- Sidebar entries for missing files are skipped. An invalid `_meta.json` throws.
- Files and folders starting with `_` are hidden.
- TOC items are `{ value, href, depth }`. Remove any use of other fields.
- A missing page throws `MdxError`. Wrap page loading in `try/catch` with `isMdxNotFound(error)`.
- JavaScript frontmatter is refused and MDX `import`/`export` are disabled. Move components imported in MDX into the `components` option.
- Syntax themes only match `.token` elements.
- In client code, `MdxClient` must come from `@ariadocs/mdx/client`.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall