Read OSS

facebook/docusaurus

6 articles

Prerequisites

01

Docusaurus Architecture: A Map of the Monorepo

A high-level orientation to the Docusaurus monorepo, covering its 40-package structure, the server/client split, the CLI orchestrator, the loadSite() pipeline, code generation, and client-side routing.

02

The Plugin Lifecycle: How Content Becomes Routes

A deep dive into the 4-phase plugin lifecycle — initialization, content loading, route creation via the actions system, cross-plugin communication, presets, synthetic plugins, and the progressive type hierarchy.

03

From Source to Static: The Build Pipeline and Bundler Abstraction

Traces the complete build flow from CLI invocation to static HTML output — multi-locale builds, the Webpack/Rspack abstraction, SSG execution modes, and the future.faster performance flag system.

04

Content Plugins and the MDX Pipeline: From Markdown to React

Explores how Docusaurus transforms Markdown and MDX files into React components — the MDX webpack loader, the remark/rehype plugin chain, the docs plugin's versioning and sidebar systems, and route creation.

05

The Theme System: Aliases, Swizzling, and Component Customization

Reveals how Docusaurus's theme system works at the Webpack alias level — layered alias resolution, the @docusaurus/* client API, theme-classic and theme-common, the swizzle CLI, and fallback components.

06

Developer Experience: Dev Server, i18n, and the Configuration System

Covers the dev server's hot reload architecture, the i18n system's locale-as-separate-site approach, configuration loading with TypeScript support, the future flag system, and a capstone data flow trace.