Skip to content
CAI
Software that uses CAICheck a score

facebook/docusaurus

59.2

Adequate · 20 September 2026

63.8k

lines of production code

TypeScript

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is Docusaurus, a static site generator framework designed for building documentation websites and blogs. It provides a comprehensive toolchain that includes a CLI for scaffolding projects, a modular plugin architecture for managing content, and a theme system for rendering user interfaces. The codebase handles the full lifecycle of site generation, from MDX parsing and bundling to client-side navigation and deployment.

How it got here

2017–2020 — Docusaurus v4 architecture and TypeScript migration

73 changes.

This period focused on the foundational rewrite for Docusaurus v4, characterized by the removal of legacy JavaScript components and the migration of core packages to TypeScript. The work established a modular, swappable bundler architecture supporting Rspack, introduced React 18 client-side rendering, and standardized developer tooling and validation across the monorepo.

2021 — MDX loader refactoring and TypeScript migration

47 changes.

This period focused on rewriting the MDX loader to support cross-compiler caching, explicit heading IDs, and improved link and image transformation logic. Concurrently, core packages like the classic preset, Google gtag plugin, and CLI were migrated to TypeScript, while the create-docusaurus tool was overhauled to support Bun and modern project scaffolding.

2022–2024 — Bundler abstraction and build performance

58 changes.

This period focused on decoupling Docusaurus from Webpack by introducing the @docusaurus/bundler package, which enables support for Rspack and SWC-based tooling to accelerate builds. Concurrently, the static site generation engine was refactored to use worker threads for improved performance and memory management, while the CLI and development server were restructured to support these swappable bundlers and fine-grained reloads.

2025–2026 — CSS cascade layers and testing migration

9 changes.

This period introduced a new CSS Cascade Layers plugin to manage style precedence and improved macOS browser launching with Arc support. Concurrently, the project internalized legacy image components for React 19 compatibility and expanded test coverage while migrating the test infrastructure from Jest to Vitest.

Features

Add Netlify functions for multiple playground environments

New serverless functions have been added to the admin site to support launching Docusaurus projects in different online editors. The main handler in \functions/index.ts\ routes requests to specific environments, with dedicated entry points now available for CodeSandbox (TypeScript and JavaScript) and StackBlitz (TypeScript and JavaScript), allowing users to choose their preferred playground when trying out Docusaurus.

admin/new.docusaurus.io/functions · high confidence

Add TypeScript example for Docusaurus

Introduces a new TypeScript-based example site for Docusaurus, including configuration files like docusaurus.config.ts, sidebars.ts, and tsconfig.json, along with supporting files such as .gitignore, .stackblitzrc, and sandbox.config.json to facilitate local development and online sandboxing.

examples/classic-typescript · high confidence

Add TypeScript templates for the classic Docusaurus site structure

New TypeScript-based template files are now included for the classic Docusaurus site layout. This adds a \HomepageFeatures\ component that renders a list of site features using SVG icons and a \pages/index.tsx\ entry point that composes the homepage header and feature section within the standard theme layout, providing users with a ready-to-use, type-safe starting point for new projects.

packages/create-docusaurus/templates/classic-typescript/src · high confidence

Add Vercel Analytics plugin for Docusaurus

Introduces the new \@docusaurus/plugin-vercel-analytics\ package, allowing users to integrate Vercel Analytics into their Docusaurus sites. The plugin supports configuration via \mode\ (auto, production, or development) and \debug\ options, automatically injecting the Vercel analytics script into client modules. It is designed to be used at most once per site and automatically disables itself in non-production environments.

packages/docusaurus-plugin-vercel-analytics · high confidence

Add debug pages for routes and registry

The debug plugin now includes dedicated UI pages to inspect internal Docusaurus structures. Users can view a list of all configured routes, including their paths, exact-match flags, and child route details, as well as a registry of aliased and resolved module paths. These new theme components (DebugRoutes and DebugRegistry) provide visibility into the build-time configuration for debugging purposes.

packages/docusaurus-plugin-debug/src/theme/DebugRoutes · high confidence

Add debug view for site metadata and plugin versions

The debug plugin now includes a new UI component that displays the current Docusaurus version, the site version (if specified), and a detailed list of all installed plugins and themes along with their types and versions. This allows users to quickly verify their environment configuration directly from the debug interface.

packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata · high confidence

Add feature requests page with Canny widget and theme support

A new Feature Requests page has been added to the website, powered by the Canny feedback widget. The implementation includes a dedicated plugin that registers the route and a React component that loads the Canny SDK. Notably, the widget now respects the site's color mode, automatically switching between light and dark themes to match the user's preference.

website/src/plugins/featureRequests · high confidence

Add official Rsdoctor plugin for Docusaurus

Users can now integrate Rsdoctor into their Docusaurus projects via the new \@docusaurus/plugin-rsdoctor\. This plugin automatically configures the appropriate Rsdoctor bundler plugin (either for Rspack or Webpack) based on the project's current bundler, allowing users to pass custom Rsdoctor configuration options through the \rsdoctorOptions\ setting in their Docusaurus config.

packages/docusaurus-plugin-rsdoctor · high confidence

Add shared template files for new Docusaurus projects

The \create-docusaurus\ package now includes a \shared\ directory containing the default \README.md\ and \.gitignore\ files used when scaffolding a new site. The README provides updated installation and deployment instructions, defaulting to npm commands and supporting both SSH and non-SSH GitHub Pages deployment. The \.gitignore\ file excludes standard build artifacts, dependencies, and environment-specific local files.

packages/create-docusaurus/templates/shared · high confidence

Add styled XSLT templates for RSS and Atom feeds

The blog plugin now includes dedicated XSLT stylesheets (atom.xsl, rss.xsl) and corresponding CSS files (atom.css, rss.css) that render the raw XML feed data into human-readable, styled HTML pages. This allows users to view their RSS and Atom feeds directly in a browser with a clean layout featuring recent posts, dates, and descriptions, rather than seeing unformatted XML source code.

packages/docusaurus-plugin-content-blog/assets · high confidence

Added PWA reload notification popup component

Users will now see a fixed-position notification banner in the bottom-right corner of the screen when a new version of the site is available. This popup, implemented in the PWA plugin's theme layer, displays a 'New version available' message with a 'Refresh' button to apply the update and a close button to dismiss it. The component is styled to be responsive, expanding to full width on small screens (500px or less) to ensure usability on mobile devices.

packages/docusaurus-plugin-pwa/src/theme · high confidence

Added base URL misconfiguration detection banner

A new client-side banner component has been introduced to detect and alert users when their Docusaurus site fails to load due to an incorrect \baseUrl\ configuration. This banner is injected via an inline script only on the homepage when the site fails to initialize, displaying the current configured base URL and suggesting a corrected value based on the actual page path. To prevent search engine indexing of this error message, the banner is hidden by default using critical CSS and uses IDs prefixed with \\\\ to signal crawlers like Algolia to ignore them.

packages/docusaurus/src/client/BaseUrlIssueBanner · high confidence

Added homepage features section to the classic TypeScript example

The classic TypeScript example now includes a new HomepageFeatures component that displays a three-column layout of key product benefits (Easy to Use, Focus on What Matters, Powered by React) using inline SVG icons and styled cards.

examples/classic-typescript/src/components · high confidence

Admonitions directive support via custom remark plugin

The MDX loader now includes a dedicated remark plugin for handling admonitions, allowing users to use Markdown directives (such as \:::note\) which are transformed into \\<admonition\>\ JSX components. This change introduces support for custom keywords, class and ID attributes, and both simple text titles and complex JSX titles within admonitions, replacing the previous external dependency with a highly customized, MIT-licensed implementation.

packages/docusaurus-mdx-loader/src/remark/admonitions · high confidence

Algolia search theme migrated to TypeScript with DocSearch v4 support

The \@docusaurus/theme-search-algolia\ package has been rewritten in TypeScript and now supports DocSearch v4 alongside v3. This update introduces AskAI capabilities, allowing users to ask questions directly in the search modal, and adds a \replaceSearchResultPathname\ configuration option to transform search result URLs. The search page now respects the \contextualSearch\ setting and includes version-specific filtering for multi-version documentation sites.

packages/docusaurus-theme-search-algolia · high confidence

CSSnano preset now removes overridden custom properties in :root

The Docusaurus CSSnano preset includes a new PostCSS plugin that cleans up duplicate CSS custom properties defined within the \:root\ selector. When the same custom property is declared multiple times, the plugin removes the earlier, overridden declarations, keeping only the final value that actually applies. It respects \!important\ flags: if any declaration of a property uses \!important\, only the non-important duplicates are removed, preserving the important value. This optimization reduces CSS size and avoids potential specificity confusion for users relying on the preset.

packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties · high confidence

Debug plugin now displays plugin instance content

The DebugContent theme component has been implemented to render a structured view of plugin data. It iterates through all plugin content, filtering out empty entries, and displays each plugin's name along with its specific instance details using a JSON viewer, providing users with a clearer, organized interface for inspecting debug information.

packages/docusaurus-plugin-debug/src/theme/DebugContent · high confidence

Debug plugin now displays site config and global data

The debug theme now includes dedicated views for inspecting Docusaurus context. The DebugConfig component renders the site configuration, while the DebugGlobalData component renders the global data, both presented in a collapsible JSON view within the debug layout.

packages/docusaurus-plugin-debug/src/theme/DebugConfig, packages/docusaurus-plugin-debug/src/theme/DebugGlobalData · high confidence

Expose Docusaurus module type aliases to end-users

The \docusaurus-module-type-aliases\ package now provides a comprehensive set of TypeScript declarations for internal generated modules and core components. Users importing from paths like \@generated/client-modules\, \@generated/docusaurus.config\, \@generated/site-metadata\, \@generated/globalData\, and \@generated/i18n\ will receive proper type checking and IntelliSense support. Additionally, type definitions are exposed for theme components (\@theme/Error\, \@theme/Layout\, etc.) and core utilities (\@docusaurus/Link\, \@docusaurus/Interpolate\, \@docusaurus/ErrorBoundary\), enabling better developer experience when extending or customizing Docusaurus themes and plugins.

packages/docusaurus-module-type-aliases/src · high confidence

Extracted npm2yarn remark plugin with Bun support and custom converters

The \@docusaurus/remark-plugin-npm2yarn\ package is now a standalone module that transforms \npm\ code blocks into synchronized tabs for \npm\, \yarn\, \pnpm\, and \Bun\. Users can configure the plugin via the \converters\ option to include or exclude package managers, and can define custom converters (e.g., for \Turbo\) to generate additional tabs. The plugin automatically handles MDX imports for \Tabs\ and \TabItem\ components and supports a \sync\ option to keep tab selections consistent across the document.

packages/docusaurus-remark-plugin-npm2yarn · high confidence

Initial website setup for Docusaurus

The website directory has been initialized with a README file providing installation and startup instructions, and a dogfooding README.mdx file that serves as a testbed for edge cases such as plugin multi-instance, Webpack configurations, and folder names with spaces.

website · high confidence

Introduce @docusaurus/bundler package to abstract Webpack and Rspack

The new @docusaurus/bundler package centralizes bundler logic, allowing Docusaurus to switch between Webpack and Rspack based on the site configuration. It provides utilities to select the correct bundler instance, CSS extraction plugins, copy plugins, and progress bar plugins for either engine. The package also introduces support for the SWC-based JS and HTML minifiers via the \future.faster\ flags, while maintaining backward compatibility with Babel and Terser. Additionally, it includes a legacy error formatting utility copied from Create React App to remove an external dependency.

packages/docusaurus-bundler · high confidence

Introduce @docusaurus/eslint-plugin with Docusaurus-specific linting rules

The new \@docusaurus/eslint-plugin\ package is now available to enforce Docusaurus best practices. It includes four rules: \no-html-links\ (warns against using raw \\<a\>\ tags instead of the Docusaurus \Link\ component), \prefer-docusaurus-heading\ (warns against using native \\<h1\>\–\\<h6\>\ tags instead of the \Heading\ component), \no-untranslated-text\ (warns when JSX text is not wrapped in translation calls), and \string-literal-i18n-messages\ (enforces that translation APIs receive hardcoded string literals). The plugin exports \recommended\ and \all\ configurations for both legacy and ESLint flat configs.

packages/eslint-plugin · high confidence

Introduce @docusaurus/faster experimental package for modern build tooling

The new \@docusaurus/faster\ package exposes experimental, high-performance dependencies to accelerate Docusaurus builds. It provides pre-configured SWC loader options for JavaScript/TypeScript, integrates Rspack and its dev server as a bundler alternative, and offers faster minification via SWC for JavaScript and LightningCSS for CSS. The package also includes utilities for resolving correct browser and Node.js targets for server-side builds, ensuring compatibility while leveraging these modern tools.

packages/docusaurus-faster · high confidence

Introduce @docusaurus/lqip-loader for low-quality image placeholders

The new @docusaurus/lqip-loader package allows webpack to generate low-quality image placeholders (LQIP) as Base64 strings during the build process. By integrating with sharp, the loader resizes input images (JPEG/PNG) to 10px and embeds the resulting Base64 data into the module export, enabling developers to implement progressive image loading patterns where a blurred placeholder is shown before the full-resolution image loads.

packages/lqip-loader · high confidence

Introduce @docusaurus/types as a shared type definitions package

The \@docusaurus/types\ package has been created to centralize and export common TypeScript definitions used across Docusaurus packages. This includes types for the site configuration (including new \FutureV4Config\ and \FasterConfig\ flags), plugin and preset structures, routing, i18n, and client modules. By consolidating these types, the package ensures consistent typing for plugin authors and internal core logic, supporting features like the new VCS config hooks, bundler abstraction (Webpack/Rspack), and improved route context handling.

packages/docusaurus-types · high confidence

Introduce @docusaurus/utils-validation package for centralized schema validation

A new \@docusaurus/utils-validation\ package has been added to centralize and standardize validation logic across Docusaurus. It provides a unified \Joi\ wrapper and a custom \JoiFrontMatter\ extension that automatically converts YAML-parsed numbers and dates to strings, preventing type mismatches in front matter. The package exports standardized schemas for plugin IDs, URI/URL validation, route base paths, admonitions, MDX remark/rehype plugins, and content visibility (draft/unlisted). It also includes utilities for normalizing plugin options and theme config, and introduces a \tagsFile\ module that validates and normalizes the new \tags.yml\ configuration for predefined tag lists.

packages/docusaurus-utils-validation · high confidence

Introduce Google Tag Manager plugin

Adds the \@docusaurus/plugin-google-tag-manager\ package, which injects the Google Tag Manager container script and noscript fallback into the site's HTML. The plugin requires a \containerId\ option and is configured to only activate in production environments, returning null during development to avoid unnecessary script injection.

packages/docusaurus-plugin-google-tag-manager · high confidence

Introduce client-side redirects plugin

The new \@docusaurus/plugin-client-redirects\ plugin allows you to define client-side redirects via configuration options (\fromExtensions\, \toExtensions\, \redirects\, and \createRedirects\). During the build, the plugin generates HTML redirect files that preserve query strings and anchors, handle trailing slash consistency, and respect the \onDuplicateRoutes\ setting to warn or fail on conflicting rules. It automatically disables itself if the experimental hash router is enabled, ensuring compatibility with offline browsing modes.

packages/docusaurus-plugin-client-redirects/src · high confidence

New @docusaurus/babel and @docusaurus/plugin-svgr packages

Docusaurus introduces two new packages to the monorepo. The \@docusaurus/babel\ package provides Babel configuration utilities and a new \extractAllSourceCodeFileTranslations\ function that parses source code ASTs to extract translation strings from \@docusaurus/Translate\ components and functions. The \@docusaurus/plugin-svgr\ package adds official SVGR support, allowing SVGs to be imported as React components with configurable SVGR and SVGO options.

packages/docusaurus-utils · high confidence

New CSS Cascade Layers plugin for controlled style precedence

A new \@docusaurus/plugin-css-cascade-layers\ plugin is introduced to manage CSS specificity using native CSS Cascade Layers. This plugin automatically wraps styles from core Docusaurus components (such as Infima, theme-common, and theme-classic) and third-party libraries (like DocSearch and Mermaid) into defined layers, ensuring predictable override behavior. Users can configure custom layer rules via the \layers\ option in their Docusaurus config, allowing them to specify which file paths belong to which layer and defining the precedence order in which those layers are applied.

packages/docusaurus-plugin-css-cascade-layers · high confidence

New TypeScript init templates with v4 defaults and improved blog setup

The \create-docusaurus\ tool now provides new TypeScript-based init templates (classic-typescript) that include a \docusaurus.config.ts\, \sidebars.ts\, and a \tsconfig.json\ extending \@docusaurus/tsconfig\. These templates are configured with \future.v4: true\ to align with upcoming Docusaurus v4 compatibility, enable \respectPrefersColorScheme\ for theme handling, and set up the blog plugin with RSS/Atom feed generation (including XSLT) and warnings for inline tags, authors, and truncated posts. The templates also update social links to use 'X' instead of Twitter.

packages/create-docusaurus/templates/classic-typescript · high confidence

New admin scripts for build, linting, and release testing

The admin/scripts directory now includes several new utility scripts to support the development workflow. copyUntypedFiles.js automates the copying of untyped source files to the lib directory, supporting a watch mode for development. formatLighthouseReport.js generates Markdown tables from Lighthouse audit results for CI reporting. generateExamples.js creates CodeSandbox and StackBlitz-ready example projects from init templates and updates Git subtrees for starter sites. resizeImage.js provides a CLI tool to optimize and resize showcase images using sharp. Finally, test-release.sh orchestrates a local end-to-end release test by spinning up a Verdaccio registry, publishing packages, and generating a test website to verify the new version works correctly.

admin/scripts · high confidence

New bundler profiling, chunk asset resolution, and static file handling plugins

This update introduces four new Webpack/Rspack plugins in the Docusaurus build pipeline. The BundlerCPUProfilerPlugin enables CPU profiling of the bundler process, outputting data compatible with Speedscope for performance analysis. The ChunkAssetPlugin injects a runtime function to resolve chunk asset URLs, supporting chunk preloading and prefetching while ensuring compatibility with future bundler versions. The ForceTerminatePlugin ensures the build process exits immediately if client bundle compilation errors occur. Finally, the StaticDirectoriesCopyPlugin handles copying static directories to the output, specifically preventing Webpack from minimizing static JavaScript and CSS files and managing directory priority correctly across different bundlers.

packages/docusaurus/src/webpack/plugins · high confidence

New changelog plugin renders release notes as a blog

A new Docusaurus plugin at website/src/plugins/changelog now automatically parses monorepo CHANGELOG.md files and renders them as a paginated blog section. The plugin generates virtual MDX posts for each release, complete with author avatars (fetched from GitHub), table of contents, and pagination labeled 'Newer release' and 'Older release'. The UI includes a header with links to the Docusaurus X account and RSS feed, and the changelog list view features a slightly larger title size to distinguish it from standard blog posts.

website/src/plugins/changelog · high confidence

New client-side utilities for blog metadata, sidebar grouping, and structured data

The blog plugin now exposes a new \contexts.tsx\ module providing React hooks (\useBlogPost\, \useBlogMetadata\) and a \BlogPostProvider\ component, allowing swizzled components to access blog post metadata (front matter, TOC, assets) without prop drilling. It also introduces \sidebarUtils.tsx\ with \BlogSidebarItemList\ and \groupBlogSidebarItemsByYear\ for rendering and organizing sidebar items, and \structuredDataUtils.ts\ which generates Schema.org \Blog\ and \BlogPosting\ JSON-LD, ensuring URLs respect the site's \trailingSlash\ configuration.

packages/docusaurus-plugin-content-blog/src/client · high confidence

New debug dashboard for inspecting site internals

The @docusaurus/plugin-debug package now registers a set of internal routes under the \_\_docusaurus/debug path, providing a debug dashboard that allows users to inspect site configuration, metadata, the plugin registry, active routes, global data, and loaded content via dedicated theme components.

packages/docusaurus-plugin-debug/src · high confidence

New debug layout with navigation and scoped styling

The debug plugin now provides a dedicated layout component that renders a navigation bar with links to Config, Metadata, Registry, Routes, Content, and Global Data pages. This layout includes a meta tag to prevent search engines from indexing the debug panel and applies scoped CSS styles for a dark-themed interface, ensuring the debug UI does not interfere with the main site's styling.

packages/docusaurus-plugin-debug/src/theme/DebugLayout · high confidence

New default theme translations and base message extraction

The @docusaurus/theme-translations package now includes default translations for new languages (Arabic, Azerbaijani, Bulgarian) and provides a base message file structure with descriptions to guide contributors. It also adds a test to ensure the base messages match the extracted theme code messages, ensuring translation completeness.

packages/docusaurus-theme-translations · high confidence

New docusaurus clear command to remove build artifacts and caches

Users can now run \docusaurus clear\ to automatically remove the generated folder, the build output folder, and bundler persistent cache folders (including \.yarn/.cache\ for Yarn PnP environments). This provides a convenient way to clean up site directories without manually deleting these paths.

packages/docusaurus/src/commands · high confidence

Docusaurus now includes a built-in broken link checker that validates both page paths and internal anchors during the build process. The new \brokenLinks.ts\ module in the server package scans collected links against the generated route map, reporting broken paths and missing anchors based on the \onBrokenLinks\ and \onBrokenAnchors\ configuration options. This allows users to catch navigation errors early in the build cycle rather than discovering them after deployment.

packages/docusaurus/src/server · high confidence

New serverless function to manage playground redirections and state

A new Netlify function utility has been added to handle user interactions with the Docusaurus playgrounds. This component now supports multiple playground options (CodeSandbox and StackBlitz, including TypeScript variants) and manages user preference persistence via cookies. It provides specific URLs for each playground environment and redirects users accordingly, while also offering a documentation redirect for general playground information.

admin/new.docusaurus.io/functionUtils · high confidence

New shared theme components and hooks in @docusaurus/theme-common

The @docusaurus/theme-common package now provides a suite of reusable React components and hooks for building Docusaurus themes. This includes the Collapsible component and useCollapsible hook for animated expand/collapse behavior, the Details component for accessible \<details\> elements with smooth animations, and the ThemedComponent utility for rendering light/dark theme variants without hydration mismatches. Additionally, the package introduces context providers and hooks for managing the announcement bar, color mode (including system preference support), and the mobile navbar sidebar, along with utility hooks for back-to-top navigation, code block word wrapping, and hiding the navbar on scroll.

packages/docusaurus-theme-common · high confidence

New structured logging and performance profiling utilities in @docusaurus/logger

The @docusaurus/logger package now provides a new logger implementation that supports structured message interpolation with specific formatting for paths, URLs, names, and code, along with consistent color-coded prefixes for success, info, warning, and error levels. It also introduces a PerfLogger that tracks execution duration and memory usage (heap used/total) for labeled operations, with color-coded thresholds for performance warnings, and supports async context tracking via AsyncLocalStorage to maintain parent-child trace relationships.

packages/docusaurus-logger/src · high confidence

New translation extraction and writing utilities for server-side i18n

The \packages/docusaurus/src/server/translations\ directory now contains the core implementation for extracting and writing translation files. \translations.ts\ provides functions to read, validate (via Joi), merge, and write translation JSON files, including logic to handle message prefixes and warn about unknown legacy keys. \translationsExtractor.ts\ orchestrates the extraction of translatable strings from site source code and plugin/theme code paths using Babel, ensuring that hardcoded labels in the classic theme and user code are captured for translation.

packages/docusaurus/src/server/translations · high confidence

New utility package for URL path and string manipulation

The \@docusaurus/utils-common\ package introduces shared utility functions for handling URL paths and strings across Docusaurus. It includes \applyTrailingSlash\ to consistently manage trailing slashes on permalinks and URLs based on site configuration, ensuring correct behavior for base URLs, query parameters, and anchors. Additionally, it provides string helpers (\addPrefix\, \removeSuffix\, etc.) and error utilities (\getErrorCausalChain\) to support internal package logic.

packages/docusaurus-utils-common · high confidence

Report unused Markdown directives in content

A new remark plugin in the MDX loader now detects Markdown directives (such as admonitions or custom containers) that are defined in your content but not actually used or processed by other plugins. When unused directives are found, Docusaurus emits a warning listing the specific directive names and their locations in the file, helping you clean up content that might render unexpectedly. This behavior is controlled by the new \siteConfig.markdown.hooks.onUnusedMarkdownDirectives\ configuration option, which allows you to customize the warning or choose to throw an error instead.

packages/docusaurus-mdx-loader/src/remark/unusedDirectives · high confidence

Support for Mermaid code blocks in Markdown

Users can now include Mermaid diagrams in Markdown files. A new Remark plugin has been added to the MDX loader that detects code blocks with the 'mermaid' language identifier and transforms them into a custom 'mermaidCodeBlock' node, enabling the rendering of Mermaid diagrams within documentation.

packages/docusaurus-mdx-loader/src/remark/mermaid · high confidence

Support for explicit heading IDs via MDX/HTML comments and classic syntax

The heading slug generation logic in the MDX loader now allows users to explicitly define anchor IDs using inline comments. You can now use MDX comments (e.g., {/\* \#my-id \*/}) or HTML comments (e.g., \<!-- \#my-id --\>) immediately following a heading to set its ID, or use the legacy curly-brace syntax (e.g., {\#my-id}) within the heading text. The system prioritizes these explicit IDs over auto-generated slugs, and the \anchorsMaintainCase\ configuration option continues to control whether auto-generated slugs preserve the original text case.

packages/docusaurus-mdx-loader/src/remark/headings · high confidence

Removals

Removal of example site pages

The example site's English-language pages for the home index, help, and users showcase have been removed from the repository. This change eliminates the default landing page content, the support/help section, and the user showcase display that were previously provided in the examples directory.

examples/pages · high confidence

Removal of legacy HeaderNav and SideNav React components

The legacy \HeaderNav\ and \SideNav\ React components have been removed from the codebase. This deletion eliminates the previous implementation of the site header navigation (including the language dropdown and internal/external link rendering) and the document sidebar navigation (including category grouping and breadcrumb toggling). Users relying on these specific UI structures for site navigation will no longer have these components available, indicating a shift to a different navigation architecture or component set elsewhere in the application.

lib/core/nav · high confidence

Removal of legacy core React components

The \lib/core\ directory has removed a suite of legacy React components and utilities, including \BlogPageLayout\, \BlogPost\, \BlogPostLayout\, \BlogSidebar\, \CompLibrary\, \Container\, \Doc\, \DocsLayout\, \DocsSidebar\, \Footer\, \GridBlock\, \Head\, \Header\, \Marked\, \Prism\, \Site\, \toSlug\, and \unindent\. This change strips out the previous implementation of the blog system, documentation rendering, site shell, and markdown syntax highlighting, indicating a significant architectural shift or migration away from these specific core modules.

lib/core · high confidence

Removal of legacy lib scripts (build, copy-examples, publish, start-server)

The \lib\ directory's standalone Node.js scripts—\build-files.js\, \copy-examples.js\, \publish-gh-pages.js\, and \start-server.js\—have been deleted. These files previously handled core operations such as generating the site build, copying example projects, publishing to GitHub Pages, and starting the development server. Their removal indicates that these functionalities are no longer managed by these specific entry points, likely having been migrated to a different build system, CLI structure, or package entry points.

lib · high confidence

Removal of legacy server-side generation and translation modules

The \lib/server\ directory has removed the legacy JavaScript modules responsible for server-side document generation, metadata reading, category reading, and translation injection (\generate.js\, \readMetadata.js\, \readCategories.js\, \server.js\, and \translation.js\). This change eliminates the runtime logic that previously handled on-the-fly markdown-to-HTML conversion, blog metadata generation, sidebar category construction, and the injection of localized strings into \siteConfig.js\ during the build or server start process.

lib/server · high confidence

The \examples/core/Footer.js\ file has been deleted, removing the custom React footer component that previously rendered site navigation, community links (such as Stack Overflow and Twitter), and a GitHub star button. This change eliminates the specific footer layout and content previously provided by this example file.

examples/core · high confidence

Remove legacy example site configuration and language files

The \examples/siteConfig.js\ and \examples/languages.js\ files have been removed from the repository. These files previously defined the configuration for a legacy 'Test Site' example, including hardcoded site metadata, header links, color themes, and a static list of supported languages. Their removal simplifies the examples directory by eliminating outdated configuration artifacts that are no longer part of the active example generation workflow.

examples · high confidence

Architecture

Blog plugin refactored into modular TypeScript source files

The blog plugin source code has been reorganized from a single monolithic file into a modular structure with dedicated TypeScript files for authors, feeds, front matter, and utilities. This change improves maintainability and type safety without altering the plugin's public API or user-facing behavior.

packages/docusaurus-plugin-content-blog/src · high confidence

Docs plugin refactored into modular source files

The \docusaurus-plugin-content-docs\ source code has been reorganized from a single monolithic file into a modular structure. This change splits the plugin logic into distinct files for specific concerns, including CLI commands (\cli.ts\), version management (\versions/\), sidebar generation (\sidebars/\), document processing (\docs.ts\), front matter validation (\frontMatter.ts\), and route generation (\routes.ts\). This refactoring improves maintainability and testability of the docs plugin without altering its external behavior.

packages/docusaurus-plugin-content-docs/src · high confidence

Refactored webpack configuration into modular, swappable bundler architecture

The webpack configuration logic in the core package has been reorganized into distinct modules (base, client, server, and configure) to support a swappable bundler strategy. This change introduces a new \@docusaurus/bundler\ abstraction that allows Docusaurus to switch between Webpack and Rspack via the \experimental\_faster.rspackBundler\ flag, while maintaining consistent build behaviors for both client and server bundles. The refactoring also standardizes the development HTML template and ensures that plugin lifecycle hooks (\configureWebpack\ and \configurePostCss\) are applied in the correct order, with PostCSS configuration running after Webpack modifications to prevent loader conflicts.

packages/docusaurus/src/webpack · high confidence

Behavioural changes

Add custom CSS theme overrides for the classic TypeScript example

The classic TypeScript example now includes a custom CSS file that overrides the default Infima theme variables. This change introduces a green primary color palette for light mode and a teal palette for dark mode, along with adjustments to code font size and highlighted code line background opacity, allowing users to see how to customize the site's appearance.

examples/classic-typescript/src/css, examples/classic/src/css · high confidence

Add utility functions for MDX node transformation and error formatting

The MDX loader now includes a new utility module that provides helper functions for internal processing. This includes a \transformNode\ function to mutate AST nodes in place, an \assetRequireAttributeValue\ function to generate specific MDX JSX attribute expressions for asset handling, and \formatNodePositionExtraMessage\ to append line and column information to error logs for better debugging.

packages/docusaurus-mdx-loader/src/remark/utils · high confidence

Added .nojekyll file to classic static example

The classic static example now includes a .nojekyll file, which prevents GitHub Pages from processing the site with Jekyll. This ensures the static assets are served exactly as built, preserving the intended structure and content without unexpected transformation by Jekyll's build pipeline.

examples/classic-typescript/static, examples/classic/static · high confidence

CLI now validates Node version and displays update notifications before running commands

The Docusaurus CLI entry points have been refactored to execute a pre-flight check (\beforeCli\) before invoking any command. This ensures that the running Node.js version meets the package's engine requirements, exiting with a clear error if it does not. Additionally, users are now notified if a newer version of Docusaurus is available, with the notification box styled to remove vertical borders and providing specific upgrade commands tailored to whether the user is on Yarn 2+ or npm. The CLI also now logs the full error stack and version information (Docusaurus and Node) on unhandled rejections or crashes to aid debugging.

packages/docusaurus/bin · high confidence

Classic example template updated for Docusaurus v3.10.2 with modern configuration and playground support

The classic example template has been regenerated to align with Docusaurus v3.10.2, introducing a modernized \docusaurus.config.js\ that leverages JSDoc type annotations for improved editor autocompletion and enables the \v4\ future flag for upcoming compatibility. The template now includes dedicated configuration files for online playgrounds, specifically \.stackblitzrc\ and \sandbox.config.json\ (configured for Node 24), facilitating easier experimentation. Additionally, the example's social links have been updated to reflect the rebranding of Twitter to X, and the \.gitignore\ file has been standardized to exclude common build artifacts and environment files.

examples/classic · high confidence

Classic preset migrated to TypeScript with stricter configuration validation

The \@docusaurus/preset-classic\ package has been rewritten in TypeScript, introducing stricter validation for preset options. Users will now encounter an error if they provide unrecognized keys in the preset configuration, ensuring that only supported options (such as \docs\, \blog\, \pages\, \sitemap\, \theme\, \gtag\, and \googleTagManager\) are accepted. Additionally, the preset now explicitly throws an error if deprecated \googleAnalytics\ options are detected, guiding users to migrate to \plugin-google-gtag\ or \plugin-google-tag-manager\. The package also includes a new \.npmignore\ file to exclude build artifacts and test files from the published package.

packages/docusaurus-preset-classic · high confidence

Client redirects now support preserving query strings and hashes in destination URLs

The client-side redirect page template has been updated to optionally forward the original request's query string and hash fragment to the destination URL. When the \searchAnchorForwarding\ flag is enabled, the JavaScript redirect logic appends \window.location.search\ and \window.location.hash\ to the target URL, ensuring that users are redirected to the exact resource including any parameters or anchor targets, rather than just the base path.

packages/docusaurus-plugin-client-redirects/src/templates · high confidence

Client-side exports restructured and enhanced

The client exports in \packages/docusaurus/src/client/exports\ have been reorganized into dedicated modules, introducing new capabilities and behavioral improvements. The \Link\ component now supports prefetching via IntersectionObserver and includes a broken link checker, while the \BrowserOnly\ component enforces that its children are render functions in development. A new \ErrorBoundary\ component provides a default theme-based error fallback, and \useGlobalData\ now exposes \usePluginData\ and \useAllPluginInstancesData\ for granular access to plugin data. Additionally, \useBaseUrl\ handles hash router edge cases, and \Interpolate\ and \Translate\ components are now explicitly exported for client-side usage.

packages/docusaurus/src/client/exports · high confidence

Debug JSON view now uses react-json-view-lite with Paraiso theme

The DebugJsonView component in the debug plugin has been replaced with a new implementation using the react-json-view-lite library. This change updates the JSON visualization to use a Paraiso-inspired dark theme with specific color coding for different data types (e.g., strings in orange, booleans in purple) and improves the visual presentation of collapsed/expanded nodes. The component now supports configurable collapse depth and handles array expansion logic (expanding arrays with fewer than 5 elements by default).

packages/docusaurus-plugin-debug/src/theme/DebugJsonView · high confidence

Enhanced image processing with dimension detection and hash preservation

The image transformation logic in the MDX loader now automatically reads and injects width and height attributes into image tags by detecting dimensions from the source file, which helps prevent layout shifts. Additionally, the processor now preserves URL hashes and query strings in image sources and supports resolving images from multiple static directories, improving compatibility with complex asset structures.

packages/docusaurus-mdx-loader/src/remark/transformImage · high confidence

Expose Babel preset for retro-compatibility

The Docusaurus package now exports a Babel preset entry point at \packages/docusaurus/src/babel/preset.ts\. This change ensures retro-compatibility with the former init template's \.babelrc.js\ configuration, which previously referenced \@docusaurus/core/lib/babel/preset\, by re-exporting the actual preset from the new \@docusaurus/babel\ package.

packages/docusaurus/src/babel · high confidence

Google gtag plugin rewritten in TypeScript with multi-tracking ID support

The Google gtag plugin has been migrated to TypeScript and now supports multiple tracking IDs (e.g., for UA to GA4 migration) by injecting a single gtag script with configuration for all provided IDs. The plugin also fixes a bug where page view events sent during SPA navigation reported the old page title by deferring the event send to the next tick, and it now validates that gtag options are not mistakenly placed in themeConfig.

packages/docusaurus-plugin-google-gtag/src · high confidence

Ideal image plugin now disabled by default in development and restricts processing to React/MDX sources

The ideal-image plugin has been updated to improve developer experience and build correctness. By default, the plugin is now disabled in development environments (via the new \disableInDev\ option, defaulting to \true\), preventing the overhead of generating multiple image variants during local development. Additionally, the Webpack loader configuration now includes an issuer check to ensure that \.png\ and \.jpe?g\ files are only processed when imported from TypeScript, JavaScript, or MDX source files, preventing unintended processing of images referenced in CSS or other non-component contexts.

packages/docusaurus-plugin-ideal-image/src · high confidence

IdealImage component migrated to TypeScript with improved prop handling

The IdealImage theme component has been rewritten in TypeScript, introducing a new file structure that separates the main component logic from legacy code. This change ensures the \img\ prop is no longer passed down to the underlying image element, preventing potential rendering issues, while remaining props are correctly forwarded. The component now supports both development mode (using the original image directly) and production mode (using the optimized ideal image logic), and includes localized status messages for loading, error, and offline states.

packages/docusaurus-plugin-ideal-image/src/theme/IdealImage · high confidence

The Docusaurus MDX loader now uses a dedicated Remark plugin to resolve local Markdown/MDX links, replacing the previous RegExp-based approach. This change ensures that links are processed through the unified AST, allowing for more accurate resolution of local file references while preserving query strings and hashes. For broken links, the system now provides detailed, context-aware error messages (including source file path and node position) and supports the new \siteConfig.markdown.hooks.onBrokenMarkdownLinks\ configuration, which allows users to define custom handlers or switch between 'warn' and 'throw' behaviors, deprecating the older \onBrokenMarkdownLinks\ string option.

packages/docusaurus-mdx-loader/src/remark/resolveMarkdownLinks · high confidence

Improved macOS browser opening with Arc support and performance optimizations

The \docusaurus start\ command on macOS now includes native support for the Arc browser, ensuring it opens correctly via AppleScript. The internal browser-opening logic has been refactored to improve performance by using \PerfLogger\ for timing operations and handling synchronous errors more gracefully. Additionally, the implementation now prioritizes reusing existing tabs for Chromium-based browsers (like Chrome, Edge, and Arc) when possible, enhancing the user experience by avoiding unnecessary new window creation.

packages/docusaurus/src/commands/utils/openBrowser · high confidence

Internalize legacy IdealImage component code for React 19 compatibility

The legacy IdealImage component code has been internalized into the theme directory, replacing the external \react-waypoint\ dependency with a custom, slimmed-down \Waypoint\ implementation. This change resolves React 19 compatibility issues and fixes a bug where the waypoint detection failed to trigger correctly on initial scroll, ensuring images load as expected when they first enter the viewport.

packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components · high confidence

Introduce ESM-based CLI entry point with explicit package manager and git strategy options

The \create-docusaurus\ CLI entry point has been converted to an ES module (index.js), replacing the previous CommonJS implementation. This change introduces explicit command-line options for selecting the package manager (\--package-manager\, supporting yarn, npm, pnpm, and bun) and configuring git clone strategies (\--git-strategy\, supporting deep, shallow, copy, and custom modes). The CLI now performs a Node.js version check before execution and lazily imports the core initialization logic, ensuring that the tool fails fast if the runtime environment is incompatible.

packages/create-docusaurus/bin · high confidence

Introduce new codegen module for generating site files and routes

The Docusaurus build process now uses a new codegen module located in \packages/docusaurus/src/server/codegen\ to generate temporary site files. This includes generating the site configuration, client modules, global data, i18n data, code translations, site metadata, and site storage. Additionally, it handles the generation of route files, including unique chunk names and route configurations. This change simplifies the plugin API and supports route props, enhancing the overall structure and maintainability of the codebase.

packages/docusaurus/src/server/codegen · high confidence

Live code blocks now support a reset button and configurable playground position

The \@docusaurus/theme-live-codeblock\ theme has been refactored to TypeScript and restructured into modular components, introducing a new Reset button that allows users to restore the original code in a live playground. The playground layout is now configurable via the \playgroundPosition\ theme option (accepting 'top' or 'bottom'), which controls whether the code editor or the result preview appears first. Additionally, the theme now supports the \noInline\ meta string to control code execution timing and includes an error boundary to gracefully handle runtime errors in the preview.

packages/docusaurus-theme-live-codeblock · high confidence

MDX content from packages with mismatched React versions is now correctly rendered

The site now correctly imports and renders MDX content from packages that declare incorrect or mismatched React versions (such as the test package 'test-bad-package' which declares React 16.14.0). This ensures that MDX components within such packages are rendered using the site's actual React version (19) rather than the version specified in the package's dependencies, preventing rendering errors and ensuring consistent behavior across all content sources.

admin/test-bad-package · high confidence

MDX content titles are now wrapped in a \<header\> element

The remark plugin in the MDX loader now automatically wraps the first H1 heading (content title) in a \<header\> JSX element. This structural change ensures consistent HTML output for page titles. The plugin also continues to expose the title text via \data.contentTitle\ and supports stripping the heading entirely when the \removeContentTitle\ option is enabled, primarily for use cases like blog posts where the title is handled separately.

packages/docusaurus-mdx-loader/src/remark/contentTitle · high confidence

MDX loader refactored with cross-compiler caching and format detection

The MDX loader in \packages/docusaurus-mdx-loader/src\ has been restructured to support a new cross-compiler cache, which deduplicates MDX compilation between client and server builds to improve production build performance. The loader now includes explicit format detection logic (via \format.ts\ and \frontMatter.ts\) to determine whether a file should be parsed as MDX or CommonMark based on file extension or front matter, and it exposes new configuration options such as \siteConfig.markdown.hooks\ and \siteConfig.markdown.format\. Additionally, the loader now supports recma plugins, allows configuring remark/rehype options, and improves error reporting by including stack traces when MDX details are unavailable.

packages/docusaurus-mdx-loader/src · medium confidence

Mermaid theme restructured with lazy loading and async rendering

The \@docusaurus/theme-mermaid\ package has been refactored to support asynchronous Mermaid rendering and improved performance. The Mermaid library is now lazy-loaded via dynamic imports to reduce initial bundle size, and the rendering logic has been updated to handle async operations, allowing for better integration with Mermaid v10+ features. The theme configuration schema now explicitly supports layout options (such as 'elk') and theme settings, with validation ensuring correct defaults for light and dark modes. Additionally, the package structure has been cleaned up with dedicated TypeScript configs for client-side code and a new \.npmignore\ file to exclude build artifacts and tests from the published package.

packages/docusaurus-theme-mermaid · high confidence

New TypeScript type definitions and CLI entry point for Docusaurus core

The Docusaurus core package now exposes a new public entry point (\index.ts\) that re-exports all CLI commands (build, serve, start, deploy, etc.) and introduces new TypeScript declaration files (\common.d.ts\, \deps.d.ts\) to define internal data structures for Static Site Generation (SSG) and external dependencies. This change formalizes the interface between the SSG process and the server entry code, ensuring that collected page data (metadata, links, anchors) is serializable and memory-efficient, while also providing type definitions for webpack plugins like \react-loadable-ssr-addon-v5-slorber\.

packages/docusaurus/src · high confidence

The \transformLinks\ module in the MDX loader has been introduced to handle the conversion of Markdown links into JSX elements. This change implements logic to resolve local file paths, including support for the \@site/\ prefix and static directories, and generates Webpack \require()\ calls for assets. It also introduces a \data-noBrokenLinkCheck\ attribute to prevent asset links from triggering the broken link checker, and supports URL hashes and search parameters in link targets.

packages/docusaurus-mdx-loader/src/remark/transformLinks · high confidence

New loading and error fallback UI for code-split chunks

The theme-fallback now includes a dedicated Loading component that displays a custom animated SVG spinner while lazy-loaded chunks are being fetched, and shows a styled error message with a retry button if loading fails. This replaces any previous implicit or missing fallback behavior, ensuring users see clear visual feedback during asynchronous module loading.

packages/docusaurus/src/client/theme-fallback/Loading · high confidence

PWA plugin disables support for the Hash Router

The PWA plugin now explicitly checks for the experimental hash router and disables itself if that router is enabled, issuing a warning to the user. This ensures the plugin does not attempt to configure service workers for a routing mode that is incompatible with its offline capabilities.

packages/docusaurus-plugin-pwa/src · high confidence

Pages plugin refactored with front matter validation and last update metadata

The pages plugin now validates Markdown front matter (title, description, slug, TOC settings, draft/unlisted status) and includes last update time and author data in page metadata. This enables users to customize page slugs, control content visibility, and display edit URLs with accurate update timestamps.

packages/docusaurus-plugin-content-pages/src · high confidence

Rebuilt client-side rendering architecture with React 18 and new lifecycle system

The client entry point has been rewritten to use React 18, introducing \startTransition\ for hydration and \createRoot\ for client-side rendering, alongside a switch to \react-helmet-async\ for managing document head tags. Navigation behavior is now handled by a new \PendingNavigation\ component that preloads route chunks before updating the UI, and a \ClientLifecyclesDispatcher\ manages plugin lifecycle events like \onRouteDidUpdate\. The application structure now relies on new context providers (\DocusaurusContextProvider\, \BrowserContextProvider\) and supports an experimental hash router via the \future.experimental\_router\ configuration.

packages/docusaurus/src/client · high confidence

Refactored build command to support multi-locale builds and new postBuild API

The build command has been restructured to explicitly support building for multiple locales via the new \--locale\ CLI option, ensuring the default locale is always built first to prevent output overwrites. This change introduces a new \postBuild\ plugin API that passes \routesBuildMetadata\ instead of the legacy \head\ attribute, aligning with the removal of the v4 future flag. Additionally, automatic base URL localization is now disabled when a single locale is specified via CLI, facilitating multi-domain deployment scenarios.

packages/docusaurus/src/commands/build · high confidence

Refactored development server startup to support swappable bundlers and fine-grained reloads

The \docusaurus start\ command has been restructured to decouple the dev server initialization from Webpack-specific logic, enabling the use of alternative bundlers like Rspack. The new implementation introduces a \createReloadableSite\ utility that manages site loading and provides fine-grained reload capabilities (reloading the entire site or specific plugins individually) via a new file watcher system. Additionally, the start command now supports HTTPS configuration via CLI options (\--https\, \--sslCert\, \--sslKey\) and integrates with the new \@docusaurus/bundler\ package for bundler-agnostic dev server creation.

packages/docusaurus/src/commands/start · high confidence

Refactored docs client interface with new React contexts and hooks

The client-side interface for the docs plugin has been restructured to use dedicated React contexts and hooks, improving how component trees access documentation data. New providers and hooks—such as \DocProvider\/\useDoc\ for doc metadata, \DocsSidebarProvider\/\useDocsSidebar\ for sidebar data, and \DocsVersionProvider\/\useDocsVersion\ for version info—allow swizzled components to access context without prop drilling. The refactor also introduces \DocsPreferredVersionContextProvider\ to manage user-preferred versions via local storage, \DocSidebarItemsExpandedStateProvider\ for sidebar expansion state, and \useDocsContextualSearchTags\ to power contextual search. Utility functions like \getActivePlugin\, \getActiveVersion\, and \getActiveDocContext\ handle route matching for multi-plugin and multi-version scenarios, while \useBreadcrumbsStructuredData\ generates JSON-LD breadcrumbs for SEO.

packages/docusaurus-plugin-content-docs/src/client · high confidence

Refactored plugin system with new lifecycle actions and self-disable support

The plugin initialization and content-loading logic in \packages/docusaurus/src/server/plugins\ has been restructured to support new plugin capabilities. Plugins can now self-disable by returning \null\ from their constructor, and the \contentLoaded\ and \allContentLoaded\ lifecycles receive an \actions\ object that allows them to add routes, create data files, and set global data. The system also enforces unique plugin instance IDs to support multi-instance plugins and resolves plugin modules using shorthand patterns (e.g., \@scope/docusaurus-plugin-name\).

packages/docusaurus/src/server/plugins · high confidence

Refactored version handling logic into dedicated modules

The version management code in the docs plugin has been split into separate files for better organization. The \files.ts\ module now handles path resolution for versioned docs, sidebars, and localized content, while \validation.ts\ centralizes checks for version names and plugin options. The \loadVersion.ts\ module extracts the logic for loading a specific version's docs and sidebars, including a new check that prevents documentation ID conflicts within a version. The \version.ts\ file manages version metadata such as banners, badges, and route paths. This refactoring does not change the external behavior but improves code maintainability.

packages/docusaurus-plugin-content-docs/src/versions · high confidence

Removal of legacy static CSS styles

The \lib/static/css/main.css\ file has been deleted, removing the bundled CSS rules that previously handled global resets, base typography, layout structures (such as the main container and home wrapper), and component-specific styling (like blockquotes and anchor links). This change indicates a shift away from this centralized static stylesheet, likely in favor of a different styling architecture or framework.

lib/static · high confidence

Restored compatibility for live code blocks in MDX v3

The MDX loader now includes a compatibility plugin that ensures legacy 'live' code blocks continue to function correctly after the upgrade to MDX v3. This change manually injects the necessary metadata properties into code nodes, preserving the behavior of live code snippets that relied on specific attributes no longer provided by the newer MDX version.

packages/docusaurus-mdx-loader/src/remark/mdx1Compat · high confidence

Rewrite of create-docusaurus CLI with Bun support and improved package manager detection

The create-docusaurus CLI has been rewritten in TypeScript (ESM) to improve reliability and performance. Users can now select Bun as a package manager alongside npm, yarn, and pnpm. The tool features smarter package manager detection, automatically identifying the manager from existing lockfiles or the user's environment, and falls back to interactive selection only when necessary. It also supports creating projects in the current directory, using local folders as templates, and allows users to specify custom git clone strategies (shallow, deep, copy, or custom commands). The rewrite removes legacy dependencies like shelljs and fs-extra in favor of native Node.js modules and cross-spawn for better cross-platform compatibility.

packages/create-docusaurus/src · high confidence

Root component converted to TypeScript

The theme-fallback Root component, which serves as the top-level wrapper for the application to maintain stateful providers across route navigations, has been converted from JavaScript to TypeScript. This change introduces strict typing for the component's props and return type, improving type safety and developer experience without altering the component's runtime behavior.

packages/docusaurus/src/client/theme-fallback/Root · high confidence

SSG engine refactored to use worker threads with memory leak fixes

The static site generation (SSG) process in packages/docusaurus/src/ssg has been rewritten to use Node.js worker threads via the Tinypool library, significantly improving build performance for large sites. This change introduces new environment variables to control concurrency and memory management: DOCUSAURUS\_SSG\_CONCURRENCY (default 32), DOCUSAURUS\_SSG\_WORKER\_THREAD\_COUNT, DOCUSAURUS\_SSG\_WORKER\_THREAD\_TASK\_SIZE (default 10), and DOCUSAURUS\_SSG\_WORKER\_THREAD\_RECYCLER\_MAX\_MEMORY (default 1 GB) to prevent memory leaks by recycling workers. The SSG executor now automatically infers the number of threads based on CPU count and page count, using os.availableParallelism(). Additionally, a new ssgNodeRequire module manually cleans up the Node.js require cache to prevent memory leaks during i18n builds, and the SSG template engine has been migrated from Eta v2 to Eta v4.

packages/docusaurus/src/ssg · high confidence

The sidebar generation logic in the docs plugin has been restructured into distinct, sequential stages: loading, normalization, validation, processing (autogeneration), and post-processing. This change introduces a new \generator.ts\ module to handle the creation of sidebar items from file structures, while \normalization.ts\, \validation.ts\, \processor.ts\, and \postProcessor.ts\ manage the transformation and filtering of sidebar configurations. The refactoring also adds support for reading \\category\.json\ metadata files to influence sidebar generation and allows custom props to be passed through category metadata.

packages/docusaurus-plugin-content-docs/src/sidebars · high confidence

Sitemap plugin rewritten in TypeScript with new filtering and lastmod capabilities

The \@docusaurus/plugin-sitemap\ has been rewritten in TypeScript and now respects the global \trailingSlash\ configuration instead of using a dedicated plugin option. It automatically excludes pages marked with \noindex\ metadata from the sitemap and supports a new \lastmod\ option (accepting \date\ or \datetime\) to include modification timestamps in the output. Users can also customize the output filename via the \filename\ option, exclude specific routes using \ignorePatterns\, and control item generation via the \createSitemapItems\ hook. The plugin now warns and disables itself if the experimental hash router is enabled.

packages/docusaurus-plugin-sitemap · high confidence

Standardize repository configuration and developer tooling

The repository now includes a comprehensive set of configuration files to standardize development workflows and code quality. This adds \.editorconfig\ for consistent editor settings, \.gitattributes\ for proper line-ending and binary file handling, and \.gitignore\ to exclude build artifacts and local caches. Code formatting is now handled by \oxfmt\ (replacing Prettier) via \.oxfmtrc.json\ and \.lintstagedrc.json\, while CSS linting uses \.stylelintrc.js\ with a custom copyright header rule. Additionally, \.cspell.json\ enables spell checking, \.syncpackrc.ts\ aligns dependency versions across the monorepo, and \.nvmrc\ sets the Node.js version to 24. Documentation for AI agents is provided via \AGENTS.md\.

(repo-wide) · high confidence

The \stylelint-copyright\ plugin (rule \docusaurus/copyright-header\) has been rewritten in TypeScript and now includes an autofix capability. When a CSS file is missing the configured copyright header, the rule will automatically insert the header comment at the top of the file during linting with the \--fix\ flag, rather than just reporting an error. This change also includes a migration to Vitest for testing and updated TypeScript configuration.

packages/stylelint-copyright · high confidence

Support for MDX \<head\> and \<details\> JSX elements

The MDX loader now includes remark plugins that transform lowercase HTML \\<head\>\ and \\<details\>\ elements into their PascalCase counterparts (\\<Head\>\ and \\<Details\>\). This change is required because MDX v2+ no longer allows substituting HTML elements via the provider, ensuring that these specific JSX elements are correctly recognized and processed by Docusaurus components.

packages/docusaurus-mdx-loader/src/remark/head · high confidence

Support for non-RSA TLS certificates in HTTPS development server

The HTTPS configuration utility in the webpack utils now validates and supports ECDSA (and other non-RSA) certificate/key pairs, in addition to the previously supported RSA keys. This change ensures that developers using EC certificates for local HTTPS development will no longer encounter errors, as the underlying validation logic now correctly parses and matches public keys from any supported algorithm type.

packages/docusaurus/src/webpack/utils · high confidence

Swizzle CLI restructured with safety statuses and language prompts

The swizzle command has been reorganized into a modular structure (actions, components, config, context, prompts, tables, themes) to support a more robust user experience. Users now benefit from explicit safety statuses (safe, unsafe, forbidden) for swizzle actions, with unsafe actions requiring a --danger flag or interactive confirmation. The CLI also prompts for a preferred language (JavaScript or TypeScript) when not specified, and improves error handling with theme name suggestions and better path resolution for subfolder components.

packages/docusaurus/src/commands/swizzle · high confidence

Table of contents now includes headings from imported MDX partials

The table of contents generated for an MDX page now automatically incorporates headings from any MDX files imported as partials. Previously, only the headings in the main page file were included; now, the loader detects these imports, retrieves their exported TOC data, and merges it into the final page TOC, ensuring that content from reusable components is properly represented in the navigation structure.

packages/docusaurus-mdx-loader/src/remark/toc · high confidence

Updated TypeScript example pages with CSS modules and MDX support

The classic TypeScript example now includes a new index page that utilizes CSS modules for scoped styling and a new markdown-page.mdx file to demonstrate how to write standalone pages without React components.

examples/classic-typescript/src/pages · high confidence

Updated blog example content and metadata

The classic and classic-typescript blog examples now include refreshed sample blog posts (including MDX with interactive JSX components) and updated author and tag configuration files, ensuring the examples reflect current Docusaurus blogging features and metadata structures.

examples/classic-typescript/blog, examples/classic/blog · high confidence

Updated blog template with MDX support and predefined tags

The shared blog template now uses .mdx files instead of .md, enabling MDX syntax and React components in blog posts. It also introduces a predefined list of tags via a new tags.yml file, alongside an updated authors.yml with social icons support.

packages/create-docusaurus/templates/shared/blog · high confidence

Updated classic example site with new homepage and markdown page templates

The classic example site has been regenerated to include a new homepage layout featuring a hero banner with a tutorial call-to-action and a three-column feature list component, alongside a standalone markdown page template for non-React content.

examples/classic/src/pages · high confidence

Updated classic site template with new homepage structure

The classic site template now includes a new homepage layout featuring a hero header and a dedicated features section. The \index.js\ page component has been updated to render a \HomepageHeader\ displaying the site title and tagline, along with a link to the tutorial, while the \HomepageFeatures\ component provides a structured view of key product capabilities using SVG icons and React-based styling.

packages/create-docusaurus/templates/classic/src · high confidence

Updated classic site template with v4 readiness and modern defaults

The classic site initialization template has been refreshed to align with upcoming Docusaurus v4 standards and current best practices. The generated \docusaurus.config.js\ now includes the \future.v4\ flag to ensure forward compatibility, uses the more robust \docSidebar\ navbar item type instead of the legacy \doc\ type, and enables \respectPrefersColorScheme\ for proper dark mode support. Additionally, the template now configures RSS and Atom feed generation with XSLT styling, includes i18n settings, and updates social links to reference X (formerly Twitter).

packages/create-docusaurus/templates/classic · high confidence

Updated pre-commit hook configuration for pnpm compatibility

The pre-commit hook in the .husky directory has been updated to optimize execution when using pnpm. A new .gitignore file was added to exclude the \_ directory, and the pre-commit script now sets the pnpm\_config\_verify\_deps\_before\_run environment variable to false to speed up hook execution. The hook continues to invoke lint-staged, with an added comment suggesting that direct binaries are favored to bypass pnpm overhead.

.husky · high confidence

Updated starter template with CSS modules and MDX pages

The shared initialization template now uses CSS modules (\.module.css\) for component and page styling, replacing the previous global-only approach, and includes a new \markdown-page.mdx\ example to demonstrate writing simple standalone pages without React.

packages/create-docusaurus/templates/shared/src · high confidence

Fixes

Add .nojekyll file to Docusaurus templates

The Docusaurus project template now includes a .nojekyll file in the static directory. This ensures that static assets are not processed by Jekyll when deployed to GitHub Pages, preventing potential build conflicts or asset stripping.

packages/create-docusaurus/templates/shared/static · high confidence

Disable z-index and CSS counter minification in CSS processing

The CSS minification preset now explicitly disables z-index optimization and CSS counter identifier reduction. These changes prevent visual layout issues and incorrect line numbering in code blocks that can occur when these specific CSS properties are aggressively minified.

packages/docusaurus-cssnano-preset/src · high confidence

Fallback error and not-found pages now render within the theme layout

The theme-fallback components for errors and 404 pages have been rewritten to ensure they render inside the site's Layout component. Previously, these fallbacks could crash the application because they lacked the necessary route context; this change wraps the error display in a RouteContextProvider to supply that context, allowing the classic theme layout to render correctly even when a page fails. Users will now see a styled error page with a 'Try again' button and a causal chain of error messages, rather than a blank screen or a secondary crash.

packages/docusaurus/src/client/theme-fallback/Error · high confidence

Fix duplicate footnote IDs on blog listing pages

Footnote references and definitions now include a unique hash suffix derived from the post file path, preventing duplicate DOM IDs when multiple blog posts are rendered on a single listing page. This ensures that clicking a footnote link correctly navigates to the corresponding footnote within the specific post context, resolving issues where navigation failed due to ID collisions across different posts.

packages/docusaurus-plugin-content-blog/src/remark · high confidence

Webpack aliases now exclude test files and type definitions

The webpack alias generation logic in the Docusaurus core package has been updated to explicitly ignore co-located test files (such as those in \\_\tests\\\ directories or matching \\.test.\\ patterns) and TypeScript declaration files (\\.d.ts\) when creating theme aliases. This ensures that only actual component source files are exposed via \@theme\ aliases, preventing potential resolution conflicts or build errors caused by test artifacts and type stubs being mistakenly included in the module resolution path.

packages/docusaurus/src/webpack/aliases · high confidence

Test coverage

Add swizzle test fixtures for nested components and varied file types; Add test coverage for theme-classic configuration and translation logic; Added CLI integration tests for plugin command registration; Added French i18n test fixtures for page content; Added Vitest snapshot for loadVersion test; Added Vitest snapshot tests for Docusaurus logger output; Added Vitest snapshot tests for docs plugin CLI, content, and translations; Added Vitest snapshot tests for server config and site loading; Added Vitest snapshot tests for sidebar generation and normalization; Added Vitest snapshot tests for swizzle wrap and eject operations; Added Vitest snapshot tests for the client-redirects plugin; Added comprehensive test suite for the client-redirects plugin; Added sidebar configuration fixtures for test coverage; Added snapshot tests for TOC remark plugin output; Added snapshot tests for footnote ID uniqueness fix; Added snapshot tests for pages plugin content loading; Added snapshot tests for the MDX image transformation plugin; Added snapshot tests for the MDX link transformation plugin; Added snapshot tests for the admonitions remark plugin; Added test coverage for the Docusaurus sidebar processing pipeline; Added test fixture for autogenerated sidebar with mixed configuration; Added test fixture for custom Docusaurus site configuration; Added test fixture for markdown frontMatter parsing hook; Added test fixture for sidebar label and metadata configuration; Added test fixtures for JS and TSX page rendering; Added test fixtures for MDX table of contents generation; Added test fixtures for docs plugin configuration and sidebars; Added test fixtures for pages plugin scenarios; Added test fixtures for theme component resolution; Added test fixtures for underscore-prefixed content exclusion; Added test fixtures for versioned site configuration; Added test fixtures for webpack alias resolution; Added test infrastructure for Vitest migration; Added tests for Docusaurus Webpack configuration logic; Added tests for Docusaurus plugin and preset loading logic; Added tests for Google gtag plugin options validation; Added tests for MDX loader format handling and processor behavior; Added tests for StaticDirectoriesCopyPlugin; Added tests for codegen route generation and chunk naming; Added tests for siteNameToPackageName utility; Added tests for the Ideal Image Legacy plugin's internal components; Added tests for the MDX image transformation plugin; Added tests for the MDX link transformation plugin; Added tests for the MDX table-of-contents remark plugin; Added tests for the Markdown link resolution Remark plugin; Added tests for the contentTitle remark plugin; Added tests for the footnote ID fixer remark plugin; Added tests for translation writing and extraction logic; Added tests for unused Markdown directive detection in the MDX loader; Added tests for version loading and metadata reading in Docusaurus docs plugin; Added tests for webpack alias resolution logic; Added unit tests for Docusaurus client export components; Added unit tests for blog plugin internals; Added unit tests for client-side context providers and routing utilities; Added unit tests for docs client utilities and React hooks; Added unit tests for the Docusaurus logger package; Added unit tests for the MDX headings remark plugin; Added unit tests for the content pages plugin; Added unit tests for the swizzle CLI commands; Added validation tests for package.json and tsconfig consistency; Added visual regression tests for the Docusaurus website; Blog plugin test fixtures expanded for comprehensive build snapshot validation; Expanded test coverage for Docusaurus server-side configuration and site loading; Introduce Argos visual regression testing for the website; Snapshot tests for Docusaurus webpack configuration aliases; Snapshot tests for webpack alias resolution.

Dependencies

Add new Docusaurus v4 example and test fixtures

The repository now includes a new TypeScript-based Docusaurus example (\examples/classic-typescript\) and several new administrative packages (\admin/new.docusaurus.io\, \admin/scripts\, \admin/test-bad-package\, \argos\). These additions support the upcoming Docusaurus v4 release by providing updated templates, maintenance scripts, and visual regression testing infrastructure.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 59.

Lenses

  • Code Health 90
  • Architecture 54
  • Maturity 67
  • Readiness 55
  • Security 72
  • Accessibility 70

Changes since last survey

  • 300 commits — 235 feature/other, 65 fixes

By area

  • (root) — 108 commits
  • .github/workflows — 55 commits
  • packages/docusaurus — 33 commits
  • website/docs — 18 commits
  • packages/docusaurus-utils — 15 commits
  • packages/create-docusaurus — 8 commits
  • packages/docusaurus-plugin-content-blog — 6 commits
  • website/community — 6 commits
  • packages/docusaurus-mdx-loader — 5 commits
  • packages/docusaurus-theme-translations — 5 commits
  • website/versioned_docs — 5 commits
  • packages/docusaurus-theme-classic — 4 commits
  • packages/docusaurus-theme-common — 4 commits
  • packages/docusaurus-plugin-content-docs — 3 commits
  • examples/classic — 2 commits
  • packages/docusaurus-plugin-client-redirects — 2 commits
  • website/_dogfooding — 2 commits
  • website/src — 2 commits
  • .devcontainer/devcontainer.json — 1 commit
  • .github/codeql — 1 commit

Notable commits

  • fix: chore(ci): Fix Node ERR_INTERNAL_ASSERTION error under Yarn PnP (#12048)
  • fix: chore(ci): fixes for the npm trusted publishing workflow (#11823)
  • fix: chore(deps): upgrade sharp, fix Argos/Playwright (#12188)
  • fix: chore(pwa-plugon): upgrade workbox, force fix security warning about serialize-javascript (#11995)
  • fix: fix(ai): improve/shorten/fix AGENTS.md, add CLAUDE.md (#12409)
  • fix: fix(blog, docs): apply trailingSlash to blog structured data URLs (#12262)
  • fix: fix(bundler): do not import @swc/html, fix StackBlitz playground (#12055)
  • fix: fix(ci): add instructions for local e2e tests + fix e2e tests (#12436)
  • fix: fix(ci): fix Dependabot error (#11879)
  • fix: fix(ci): fix Netlify parallel git backfill not propagating cmd exit code (#12259)
  • fix: fix(ci): fix TS6 upgrade + prepare for TS7 (#12287)
  • fix: fix(ci): fix dependabot cooldown delays (#12241)
  • fix: fix(ci): fix our canary releases workflow (#12438)
  • fix: fix(ci): fix pnpm e2e tests - pin to pnpm 11 + migrate env variable name (#11993)
  • fix: fix(ci): fix tests after recent TS 7.0.2 release (#12441)
  • fix: fix(ci): restore Node 24 for Netlify builds (AI-assisted) (#12468)
  • fix: fix(ci): skip CI workflows that fail from forks (#12372)
  • fix: fix(cli): docusaurus serve should pass --host to server.listen() (#12127)
  • fix: fix(client-redirects): preserve external redirect targets trailing slash (#12004)
  • fix: fix(content-docs): translate generated-index category titles in pagination links (#11794)
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

facebook/docusaurus was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 714d743f9c461839b7e7d6101e2b65ac43a37956 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.