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/api.md

View on GitHub
# API cheat sheet

Full docs: https://ariadocs.vercel.app/docs/mdx

| Export | Notes |
| --- | --- |
| `createDocs(config)` | `config`: `contentDir`, `remarkPlugins`, `rehypePlugins`, `components`, `blockJs` |
| `parseMdx(options)` | Returns `{ source, content, frontmatter, toc, MDX }`. `MDX` is a React element (Server Components). |
| `serializeMdx(options)` | Returns `{ source, content, frontmatter, toc, serialized }` for `MdxClient` |
| `readMdx`, `getFrontmatter`, `getToc` | Same options as `parseMdx` |
| `getNavigation({ contentDir })` | `NavItem[]` built from folders and `_meta.json` |
| `getPagePaths({ contentDir })` | `["/", "/intro", "/guides/setup"]` |
| `MdxError`, `isMdxNotFound(error)` | Codes: `MDX_NOT_FOUND`, `MDX_INVALID_SLUG` (both 404), `MDX_INVALID_META`, `MDX_COMPILE_ERROR` |
| `slugToTitle(slug)` | `"getting-started"` becomes `"Getting Started"` |
| `MdxServer` | `<MdxServer source remarkPlugins rehypePlugins components blockJs />`, also at `@ariadocs/mdx/server` |
| `MdxClient` | `<MdxClient serialized components />`. Import from `@ariadocs/mdx/client` in client code. |

Options are either `{ contentDir, slug }` (file) or `{ source }` (string), plus the render options.
Types: `BaseFrontmatter`, `DocsConfig`, `DocsInstance`, `DocsPageOptions`, `MdxOptions`, `ParseMdxResult`, `SerializeMdxResult`, `SerializeResult`, `MDXComponents`, `NavItem`, `TocItem`, `RemarkPlugins`, `RehypePlugins`.

`@ariadocs/mdx/plugins` exports `remarkGfm`, `rehypeSlug`, `rehypeAutolinkHeadings`, `rehypeCodeTitles`, `rehypePrism`, `rehypeCodeRaw` (after `rehypePrism`, for `Pre`'s copy button) and `remarkBlockJs`.
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