EmcyDocs
Now available on npm

Documentation that lives in your app

EmcyDocs is an App Router-native MDX documentation library for Next.js. File-based content, locale-aware routes, a flexible theme system, and a mobile-first UX all in one package.

Terminal

⌘K
Command search
RSC
Server MDX
Theme tokens
emcydocs — docs
⌘K

Getting started

Install the package

Server-rendered MDX with search, TOC, and a theme you can actually tune.

npm install @emcy/docs
RSCSSGi18n

Composable API

Headless where it counts. Yours where it matters.

Your MDX files and URLs stay in git. Reskin layout, search, and components through React slots — no migration, no CMS lock-in.

  • createDocsSource() — routes, nav, search, metadata
  • DocsLayout slots — header, sidebar, theme, searchAction
  • getDefaultMdxComponents() — split core vs interactive
  • DocsThemeConfig — preset, hue, density, radius, tokens
import { DocsLayout, createDocsSource } from "@emcy/docs";

export const docs = createDocsSource({
  contentDir: "./content/docs",
  basePath: "/docs",
});

export default function Layout({ children }) {
  return (
    <DocsLayout
      navigation={docs.getNavigation()}
      searchAction={searchDocs}
      theme={{ color: { accentHue: 178 } }}
    >
      {children}
    </DocsLayout>
  );
}

Production docs in three moves

No separate CMS. No opaque config DSL. Just files your team already understands.

1

Install & wire the source

createDocsSource() discovers MDX, builds nav, metadata, search, and static params.

2

Drop in DocsLayout

Search, sidebar, TOC, and mobile UX ship with sensible defaults you can override.

3

Ship your voice

Tune presets, density, accent hue, and custom header or sidebar components.

One layout, flexible docs chrome

Shape the experience with preset palettes, accent tuning, density, shell sizing, token overrides, and optional custom header or sidebar overrides.

Popular

Classic

The core docs experience with sidebar, search, TOC, and shared mobile UX.

Theme system

Preset palettes, mode, density, radius, accent tuning, token overrides, and shell sizing from one nested theme config.

Custom chrome

Replace the default header or sidebar with your own component or leave them blank.

Locale routing

Keep the default locale clean while `es` and `zh` live on explicit route prefixes.

Built for modern Next.js

Everything you need to build great documentation, without the boilerplate.

App Router Native

Generate metadata and static params from the same content source. First-class RSC support.

File-based Locales

Keep en.mdx and es.mdx in the same folder. Routes handle locale prefixes automatically.

Mobile-first UX

Built-in mobile nav, search, sticky chrome, and scroll locking. No rebuilding required.

Section Deep Links

Search results jump directly to matching section anchors with useful snippets.

Progressive Disclosure

Use createDocsSource for the common path, override when you need more control.

Battle Tested

Dogfooded against real apps, so the API handles route quirks, custom chrome, and real content.

Ready to build better docs?

Get started in minutes. Install the package, create your first MDX file, and you are live.