For AI agents: the complete documentation index is available at https://rspress.rs/llms.txt, the full documentation bundle is available at https://rspress.rs/llms-full.txt, and this page is available as Markdown at https://rspress.rs/blog/rspress-v2-1.md.
close
  • English
  • November 2, 2026

    Announcing Rspress 2.1.0

    Rspress 2.1.0 is now available. This release includes:

    • SSG-MD enabled by default: generate llms.txt and page Markdown without additional configuration.
    • New WebMCP tools: browser Agents can directly query, read, and navigate documentation.
    • Built-in sitemaps, clean URLs and anchor validation enabled by default.
    • Migration to React Router Data mode, with scroll restoration and a new page loading error screen.

    SSG-MD enabled by default

    SSG-MD renders MDX and React components to Markdown for Agents to read.

    The Rspress website has scored 100/100 in the AFDocs evaluation. Starting in Rspress 2.1.0, SSG-MD is enabled by default, so you no longer need to set llms: true explicitly.

    Production builds generate these files alongside HTML pages:

    doc_build/
    ├── llms.txt           # Documentation index for selective reading
    ├── llms-full.txt      # Complete documentation content
    └── guide/
        ├── getting-started.html
        └── getting-started.md

    In How to build an Agent-friendly website, we explain how to combine SSG-MD, llms.txt, and Markdown content negotiation to help Agents discover and read documentation.

    Built-in WebMCP tools

    WebMCP lets websites provide tools to browser Agents. Rspress 2.1.0 enables these six documentation tools by default:

    ToolPurpose
    rspress_get_site_infoGet site information, languages, versions, navigation, and the current sidebar
    rspress_list_pagesFilter pages by language, version, and keywords
    rspress_get_pageRead a specific page's metadata, outline, and SSG-MD documentation without navigating (enabled together with SSG-MD)
    rspress_get_current_pageRead the current page's metadata, outline, and SSG-MD documentation (enabled together with SSG-MD)
    rspress_search_docsSearch the local documentation index for the current language and version
    rspress_navigateNavigate to an internal page and return page information once it loads

    The new useWebMcp Hook also lets components register their own tools:

    import { usePage, useWebMcp } from '@rspress/core/runtime';
    
    export function PageTitleTool() {
      const { page } = usePage();
    
      useWebMcp({
        name: 'my_site_page_title',
        description: 'Get the current page title',
        annotations: { readOnlyHint: true },
        execute: () => ({ title: page.title }),
      });
    
      return null;
    }

    Tools register when the component mounts and unregister when it unmounts. Register site-wide tools in layout components and page-specific tools in their pages.

    WebMCP is still an experimental browser API. It requires document.modelContext to be enabled and access over HTTPS or localhost. Other browsers can read the site normally.

    Set webMcp: false to disable built-in tools. This does not affect custom tools registered with useWebMcp.

    Built-in sitemaps

    Rspress 2.1.0 generates sitemap.xml by default during production builds. Installing @rspress/plugin-sitemap is no longer necessary.

    Set the deployment origin with siteOrigin and the subpath with base to generate absolute URLs:

    rspress.config.ts
    import { defineConfig } from '@rspress/core';
    
    export default defineConfig({
      siteOrigin: 'https://example.com',
      base: '/docs/',
    });

    Use the top-level sitemap option to configure priorities, update frequencies, and individual page entries. Existing projects can use it to replace @rspress/plugin-sitemap.

    Sitemaps are generated even with ssg: false. Set sitemap: false if another process generates your sitemap.

    Clean URLs by default

    route.cleanUrls now defaults to true instead of false. Generated links for regular pages omit .html, for example changing /guide/getting-started.html to /guide/getting-started.

    Your hosting platform must serve /foo.html directly when /foo is requested. Set route.cleanUrls: false if your host does not support this or you need to keep the .html suffix.

    Internal anchor validation by default

    markdown.link.checkAnchors now defaults to true instead of false. Rspress checks whether linked sections exist, catching stale links such as /guide/config#old-heading after a heading is renamed.

    Validation covers same-page, relative, and absolute internal links to Markdown and MDX pages, and skips external URLs. Use markdown.link.checkAnchors.excludes for anchors that cannot be identified statically, such as dynamically generated anchors, or set checkAnchors: false to disable validation.

    React Router data mode

    Rspress now uses React Router Data mode. Default theme links and useNavigate() calls load the destination's data and code before switching the URL and page content. The current page stays visible while loading.

    With React Router 7, navigation functions returned by useNavigate() and useLinkNavigate() support await to wait for navigation to finish.

    The new ErrorLayout error page offers reload and home actions when page loading or rendering fails. It also shows error details in development. Custom themes can replace ErrorLayout.

    Scroll restoration

    Rspress restores the scroll position when readers go back, go forward, or reload. For example, after reading partway through a long page, visiting another page, and going back, readers can continue where they left off. React Router also handles anchor navigation.

    Upgrade checklist

    • Update @rspress/core and any official plugins used by your project, for example:

      package.json
      {
        "devDependencies": {
          "@rspress/core": "~2.1.0",
          "@rspress/plugin-preview": "~2.1.0",
          "@rspress/plugin-twoslash": "~2.1.0"
        }
      }
    • Check server rendering compatibility for SSG-MD. Wrap browser-dependent content in BrowserOnly. Setting ssg: false does not disable SSG-MD. Sites that cannot support server rendering need both ssg: false and llms: false.

    • Check your sitemap configuration. Replace @rspress/plugin-sitemap with the built-in sitemap option, or set sitemap: false if another process generates the sitemap.

    • Check that your host supports URLs without .html, such as serving /foo.html directly when /foo is requested. Set route.cleanUrls: false to retain the previous link format.

    • Run a production build and fix invalid anchors. Exclude dynamically generated anchors with markdown.link.checkAnchors.excludes, or set checkAnchors: false to disable validation.

    See the v2.1.0 Release Notes for the complete changelog.

    Thank you to everyone who contributed to this release! Share feedback on GitHub, or join the conversation on Discord.