1 min read

Introduction

document0 is an open-source, headless documentation framework that gives you all the hard parts — file-system scanning, page trees, MDX processing, full-text search, llms.txt generation, and a plugin registry — while making zero decisions about your UI.

Build your docs site with any styling system you like. Ship exactly the design you want.

Why document0?

Most documentation frameworks force you into their component library, their design tokens, and their CSS. Customising them means fighting the framework. document0 takes the opposite approach: it handles the data and processing layer completely, and hands you typed data structures you can render any way you want.

Packages

PackageDescription
@document0/coreFile-system source, page trees, navigation, Orama-backed search, llms.txt generation, OpenAPI support
@document0/mdxMDX compilation, frontmatter extraction, remark/rehype plugins, Shiki highlighting
@document0/mdcMDC processor for Vue/Svelte/non-React — markdown to HTML or JSON AST with Shiki highlighting
@document0/cliPlugin manager — install and update components and plugins from the registry
create-document0Scaffold a complete docs site in seconds

Quick example

import { DocsSource } from "@document0/core";
import { createSearchRoute } from "@document0/core/search";
import { processMdx } from "@document0/mdx";
import { createHighlighter } from "shiki";

const source = new DocsSource({ rootDir: "./content/docs", baseUrl: "/docs" });
const pages = await source.getPages();
const tree = await source.getPageTree();

// Full-text search API route (Orama-backed)
export const { GET } = createSearchRoute(source);

// MDX processing with syntax highlighting
const highlighter = await createHighlighter({ themes: ["github-dark"], langs: ["typescript"] });
const { code, frontmatter, toc } = await processMdx(rawMdx, { highlighter });

Next steps

  • Installation: install the packages
  • Quickstart: build your first docs site in 5 minutes
  • CLI: install plugins and components from the registry
  • Next.js guide: App Router walkthrough, including content hot reload in dev
  • Changelog: release history for packages and docs