facebook/docusaurus
6 articles
Prerequisites
- ›Basic React knowledge (components, hooks, context)
- ›Familiarity with Node.js and npm/yarn workspaces
- ›General understanding of static site generators
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.
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.
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.
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.
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.
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.