Introduction
Onedocs is a set of layouts, components and helpers for documentation sites built with Next.js and Fumadocs. You write Markdown, describe your site in one config file, and Onedocs supplies the docs shell, a home page and the SEO routes.
It is meant for standalone documentation websites, not for adding docs to an existing application.
What Onedocs adds
On top of Fumadocs, the onedocs package gives you:
- Layouts -
DocsLayoutandDocsPagewrap the Fumadocs UI docs layout, with sidebar, search, theme toggle and table of contents.HomePagerenders a landing page with hero, install commands, features and footer. - One config file -
onedocs.config.tsholds the title, description, logo, favicon, navigation links, footer and the home page content. - MDX components -
mdxComponentsregisters callouts, tabs, cards, steps, accordions, file trees, image zoom and type tables, so pages use them without imports. - CSS preset - one import brings in Tailwind CSS v4, the Fumadocs UI theme and the Onedocs layout styles.
- SEO helpers - functions for
sitemap.xml,robots.txt,llms.txt,llms-full.txt, page metadata and Open Graph images.
What you set up yourself
Onedocs does not bundle Next.js or Fumadocs. They are peer dependencies that you install next to it:
Shell
npm install onedocs fumadocs-core fumadocs-mdx fumadocs-ui lucide-react@0.562 next react react-dom
You also need Tailwind CSS v4, Node.js 20.9 or later, and about ten small files: the Next.js and Fumadocs MDX config, a content source, the root layout, the docs layout and the docs page route. Getting Started shows each one.
Where things are configured
| What | Where |
|---|---|
| Site title, logo, navigation, footer | onedocs.config.ts, see Configuration |
| Home page hero and features | homepage in onedocs.config.ts, rendered by HomePage in src/app/page.tsx |
| Docs layout and pages | src/app/docs/layout.tsx and src/app/docs/[[...slug]]/page.tsx, see Getting Started |
| Content folder and sidebar order | source.config.ts and content/docs/meta.json |
| MDX components | mdxComponents, see Components |
| Search, sitemap, robots.txt, llms.txt | Route files under src/app/, see SEO & Search |
| Metadata and Open Graph images | onedocs/metadata and onedocs/og, see API Reference |
Philosophy
- Markdown-first - Write
.mdor.mdx, get docs - One config file - Site-wide settings live in
onedocs.config.ts - Escape hatches - Need more control? Use Fumadocs directly