Skip to content

Releases: web-infra-dev/rspress

v2.1.0-beta.1

v2.1.0-beta.1 Pre-release
Pre-release

Choose a tag to compare

@SoonIter SoonIter released this 15 Oct 12:07
75f9686

What's Changed

New Features 🎉

  • feat(core/router): migrate navigation to React Router data mode by @SoonIter in #3685
  • feat(core): add built-in WebMCP tools and useWebMcp by @SoonIter in #3742
  • feat(core): enable llms by default in v2.1.0 by @SoonIter in #3744
  • feat(core): enable built-in sitemap generation by @SoonIter in #3700

Bug Fixes 🐞

  • fix(plugin-playground): strip quotes from code-block meta values by @Marrrrrrrrry in #3728
  • fix(ssg-md): specify React 18 renderer version in warning by @SoonIter in #3749

Document 📖

  • docs(auto-nav-sidebar): expand navbar configuration examples by @SoonIter in #3718
  • docs(i18n): clarify multilingual setup and optional translations by @SoonIter in #3717
  • docs(website): showcase i18n and multi-version on homepage by @SoonIter in #3719
  • docs: add descriptions for configuration and plugin pages by @chenjiahan in #3735
  • docs: drop removed nextPageText option, fix languageParity heading by @Marrrrrrrrry in #3729
  • docs(website): add icons to AI sidebar entries by @SoonIter in #3746
  • docs(contributing): update development and testing instructions by @Jarvis636431 in #3751

Other Changes

  • chore(deps): update all patch dependencies by @renovate[bot] in #3721
  • chore(deps): update rstack by @renovate[bot] in #3722
  • chore(deps): update dependency mdast-util-from-markdown to ^2.1.0 by @renovate[bot] in #3723
  • chore(deps): update dependency tinypool to v2 [security] by @renovate[bot] in #3736
  • chore(build): replace Nx with pnpm workspace scripts by @SoonIter in #3737
  • chore(deps): update dependency memfs to ^4.80.0 by @renovate[bot] in #3724
  • chore(deps): update all patch dependencies by @renovate[bot] in #3740
  • chore(ci): add Linux tests and align Node versions by @Marrrrrrrrry in #3730
  • chore(deps): update rstack by @renovate[bot] in #3741
  • chore(deps): update playwright monorepo to v1.64.0 by @renovate[bot] in #3743
  • chore(lint): restrict imports across parent directories by @SoonIter in #3745
  • chore(release): bump version to 2.1.0-beta.1 by @SoonIter in #3747

New Contributors

Full Changelog: v2.0.23...v2.1.0-beta.1

v2.0.23

Choose a tag to compare

@SoonIter SoonIter released this 29 Sep 07:38
1f5aaeb

What's Changed

Bug Fixes 🐞

  • fix(theme): preserve literal content in inline Markdown by @SoonIter in #3687
  • fix(core): accept site data HMR updates by @Shadorux in #3698
  • fix(theme/Search): ignore Enter when the search panel is closed by @tiagovilasboas in #3710
  • fix(core): keep replacement patterns in head config during SSG by @kwy404 in #3703
  • fix(cli): skip Node compile cache in CI by @chenjiahan in #3713
  • fix(shared): respect path segment boundary in withBase and removeBase by @kwy404 in #3702
  • fix(theme/SourceCode): exclude source links from outline by @SoonIter in #3715

Refactor ðŸ”Ļ

  • refactor(core): centralize virtual module access in runtime hooks by @SoonIter in #3701

Document 📖

Other Changes

New Contributors

Full Changelog: v2.0.22...v2.0.23

v2.0.22

Choose a tag to compare

@SoonIter SoonIter released this 17 Sep 12:47
731163d

What's Changed

New Features 🎉

  • feat(theme/Steps): support multiple heading levels by @ruibaby in #3652
  • feat(theme/Search): animate search panel opening by @SoonIter in #3645
  • feat(theme/Llms): Add Head component for metadata links in LlmsHint 🔗 by @sanjaiyan-dev in #3672
  • feat(theme/Nav): support responsive navigation slots and NavList by @SoonIter in #3670

Bug Fixes 🐞

  • fix(theme): keep search panel cancel text on one line on mobile by @ruibaby in #3637
  • fix(search): strip directive markers from search index content by @buyfakett in #3638
  • fix(theme): update light-mode Shiki string token color by @SoonIter in #3642
  • fix(plugins): use import.meta.dirname for package paths by @chenjiahan in #3653
  • fix(plugin-twoslash): relax typescript peerDependency to ^5.5.0 || ^6.0.0 by @colinaaa in #3657
  • fix(core): use native paths for route files by @SoonIter in #3664
  • fix(theme/SwitchAppearance): correct appearance transition animation by @SoonIter in #3661
  • fix(core): track delegated config files and dependencies by @chenjiahan in #3671
  • fix(theme): align hook usage with React rules by @SoonIter in #3673
  • fix(theme/Search): await FlexSearch addAsync before init resolves by @devtechedge in #3678
  • fix(theme/Search): use native prefetch link tag for search index by @SoonIter in #3681
  • fix(search): cap token length in the default search index to fix OOM by @youyongsong in #3682
  • fix(theme/Search): show search index loading errors by @SoonIter in #3679

Document 📖

Other Changes

New Contributors

Full Changelog: v2.0.21...v2.0.22

v2.0.21

Choose a tag to compare

@SoonIter SoonIter released this 27 Aug 12:01
7bd6c16

What's Changed

Bug Fixes 🐞

  • fix(theme/Link): stabilize anchor scrolling after navigation by @SoonIter in #3627
  • fix(theme): keep all surfaces in sync when switching appearance by @fi3ework in #3628
  • fix(theme/Nav): fix left-positioned menu alignment and spacing by @ruibaby in #3629
  • fix(theme): replace border-bottom link underlines with text-decoration by @SoonIter in #3631
  • fix(theme/Banner): support SSR and prevent flash before hydration by @SoonIter in #3630
  • fix(theme): limit link hover opacity to callouts by @SoonIter in #3632
  • fix(theme/Nav): expand navbar item click areas by @SoonIter in #3633
  • fix(theme/CodeBlock): preserve background when scrolling horizontally by @ruibaby in #3634

Other Changes

Full Changelog: v2.0.20...v2.0.21

v2.0.20

Choose a tag to compare

@SoonIter SoonIter released this 25 Aug 09:53
45bd361

Highlights

🧭 New Blog: How to build an Agent-friendly website

Can an AI agent find, read, and understand your documentation as easily as a human? This new guide shows how Rspress combines llms.txt, SSG-MD, Accept: text/markdown, and injectLlmsHint to build documentation for both humans and Agents—and how AFDocs makes the result measurable.

image

Read the blog: How to build an Agent-friendly website

🔗 Normalize clean URLs before rendering

Static hosts can serve the same page through URLs such as /guide, /guide.html, /guide/, and /guide/index.html. Rspress can now match the actual route first and normalize the browser address bar to the format selected by route.cleanUrls before the page renders:

import { defineConfig } from '@rspress/core';

export default defineConfig({
  route: {
    cleanUrls: true,
    cleanUrlsRedirect: true,
  },
});

With this configuration, /guide.html becomes /guide, while /reference/index.html becomes /reference/. Normalization uses history.replaceState, does not reload the page, and preserves base, query parameters, hashes, and existing history state.

This is a browser-side fallback rather than an HTTP 301/308 redirect. Keep server or CDN redirects for canonical SEO behavior.

Documentation: route.cleanUrlsRedirect

Blog: The trailing slash problem in static sites

Related PR: #3571

What's Changed

New Features 🎉

Performance 🚀

  • perf(runtime): mark sideEffects: false for @rspress/shared by @SoonIter in #3587

Bug Fixes 🐞

  • fix(theme/Llms): omit redundant Markdown page hint by @SoonIter in #3567
  • fix(theme): Fixed ToC tooltips that could contain html strings by @elliotcourant in #3588
  • fix: configure Rslint type checking for workspace projects by @elecmonkey in #3599
  • fix(plugin-twoslash): stop tracking hover popup position outside of visible state by @Karibash in #3603
  • fix(ssg-md): include siteOrigin in Markdown links by @SoonIter in #3606
  • fix(route/localeRedirect): avoid false redirect-only detection by @SoonIter in #3609
  • fix(core): normalize persistent cache build dependency path by @hardfist in #3625

Document 📖

Other Changes

New Contributors

Full Changelog: v2.0.19...v2.0.20

v2.0.19

Choose a tag to compare

@SoonIter SoonIter released this 30 Jul 06:33
5efbc5d

Highlights

ðŸĪ– Guide AI agents from generated Markdown

When SSG-MD is enabled, every generated Markdown page now starts with an agent-readable directive pointing to llms.txt, llms-full.txt, and the Markdown version of the current page:

> For AI agents: the complete documentation index is available at https://example.com/llms.txt, the full documentation bundle is available at https://example.com/llms-full.txt, and this page is available as Markdown at https://example.com/guide/index.md.
image

This extends the existing HTML hint to Markdown output. Its URLs automatically respect siteOrigin, base, locale, and version prefixes, helping agents discover the right machine-readable content from either format.

Documentation: SSG-MD · injectLlmsHint

Related PR: #3544

ðŸŽĻ Add icons to generated sidebars and navigation

Use icon to display an image, inline SVG, emoji, external URL, or data URL before sidebar and navbar labels. Auto-generated sidebars support icons on groups, items, and section headers through _meta.json or page frontmatter, while navigation icons can be configured through _nav.json or themeConfig.nav.

For a local image, place it in public and reference it with an absolute path:

[
  {
    "type": "file",
    "name": "introduction",
    "label": "Introduction",
    "icon": "/icon.png",
    "tag": "new"
  }
]

Icons render before the label, while an existing tag remains on the right.

image

Documentation: Sidebar icons and tags · nav · sidebar

Related PR: #3554

⚡ Speed up lastUpdated on large sites

Rspress now resolves Git history for all documentation pages in one batched pass instead of spawning one git log process per page. Existing lastUpdated configuration remains unchanged:

import { defineConfig } from '@rspress/core';

export default defineConfig({
  themeConfig: {
    lastUpdated: true,
  },
});

In the PR benchmark, Rspress resolved metadata for its 208-page documentation site with two Git processes in about 300 ms. This avoids the process storms that could make large sites spend minutes resolving page metadata.

Documentation: lastUpdated

Related PR: #3545

What's Changed

New Features 🎉

  • feat(theme/Llms): support llms directive hints in Markdown by @SoonIter in #3544
  • feat(auto-nav-sidebar): support icon field in sidebar and navbar by @SoonIter in #3554

Performance 🚀

  • perf(core): resolve lastUpdated with a single git process by @fi3ework in #3545

Bug Fixes 🐞

  • fix(plugin-playground): support HMR updates by @SoonIter in #3532
  • fix(route/i18n): redirect locale before hydration and migrate to route.localeRedirect by @SoonIter in #3534
  • fix(core): declare public type dependencies by @SoonIter in #3540
  • fix(core): preserve async config inference by @chenjiahan in #3541
  • fix(theme/outline): hide dividers without content by @SoonIter in #3556
  • fix(plugin-playground): scope Monaco preloads to playground pages by @SoonIter in #3559
  • fix(ssg-md): preserve MDX exports by @SoonIter in #3562
  • fix(theme/llmsUI): warn when copying Markdown in dev by @SoonIter in #3563

Refactor ðŸ”Ļ

  • refactor(core/rsbuild): reuse Rsbuild restart lifecycle by @SoonIter in #3537
  • refactor(core): remove redundant AST filtering by @chenjiahan in #3558

Document 📖

Other Changes

Full Changelog: v2.0.18...v2.0.19

v2.0.18

Choose a tag to compare

@SoonIter SoonIter released this 17 Jul 18:05
8978dd9

Highlights

ðŸĪ– Customize llms.txt and Guide LLMs to Markdown

Enable llms to generate llms.txt, llms-full.txt, and a Markdown copy of every page. You can now use llms.llmsTxt to control the complete llms.txt output with site metadata and navigation-ordered pages. Rspress also injects the following hidden hint into generated HTML pages so LLMs can discover these files:

<div style="display:none" hidden="" aria-hidden="true">Are you an LLM? View https://example.com/llms.txt for optimized Markdown documentation, or https://example.com/llms-full.txt for full documentation bundle. This page is also available as Markdown at https://example.com/guide/index.md</div>

The hint is enabled by default. Use injectLlmsHint: false to disable it independently; the configuration below also shows how to customize llms.txt:

import { defineConfig } from '@rspress/core';

export default defineConfig({
  llms: {
    llmsTxt: ({ title = 'Documentation', sections }) => {
      const pages = sections
        .flatMap(section => section.pages)
        .map(page => `- [${page.title}](${page.link})`)
        .join('\n');

      return `# ${title}\n\n${pages}`;
    },
  },
  themeConfig: {
    llmsUI: {
      injectLlmsHint: false,
    },
  },
});

Documentation: SSG-MD · injectLlmsHint

Related PRs: #3527 · #3526

🌍 Add Language Alternatives Automatically

For pages with existing translations, Rspress now adds reciprocal language links to <head>, helping search engines send readers to the right language:

<link rel="alternate" hreflang="en" href="https://example.com/docs/guide.html">
<link rel="alternate" hreflang="zh" href="https://example.com/docs/zh/guide.html">

Only translations that actually exist are included. Generated URLs automatically respect base, siteOrigin, and route.cleanUrls.

Documentation: Customizing head tags

Related PR: #3524

⚡ Start Loading Page Code Before Hydration

Each generated page now preloads its own async route chunk:

<link rel="preload" href="/static/js/async/route-<hash>.js" as="script">

This lets the browser fetch the page code before the client runtime starts hydration, removing an extra network waterfall. Preload URLs support base, CDN asset prefixes, and assetPrefix: 'auto'.

Documentation: Customizing head tags

Related PR: #3518

What's Changed

New Features 🎉

  • feat(plugin-algolia): Integrate startTransition for navigation and refactor preconnect logic 🔍 by @sanjaiyan-dev in #3508
  • feat(plugin-algolia): Add Tamil (āŪĪāŪŪāŪŋāŪīāŊ) translations for Algolia search interface 📜 by @sanjaiyan-dev in #3509
  • feat(SEO/i18n): add alternate links for multilingual pages by @SoonIter in #3524
  • feat(ssg-md): support custom llms.txt rendering by @SoonIter in #3527
  • feat(theme/Llms): add injectLlmsHint option to guide LLMs to Markdown by @SoonIter in #3526

Performance 🚀

  • perf(runtime): preload current route chunks with link tag by @SoonIter in #3518

Bug Fixes 🐞

  • fix(theme/Nav): add :hover as onMouseEnter fallback before hydration by @SoonIter in #3515
  • fix(create-rspress): preserve skill names in prompts by @SoonIter in #3522
  • fix(theme/HomeFeature): fix shine not rotating with card causing gap by @HenryZ119 in #3511
  • fix(theme/Llms): hide "Open in chat" row when no chat-openable optionâ€Ķ by @cloudmoonocus in #3517
  • fix(create-rspress): add TypeScript dependency to templates by @SoonIter in #3525
  • fix(theme/Llms): align view options behavior by @SoonIter in #3523

Refactor ðŸ”Ļ

  • refactor(create-rspress): improve custom theme home gradient by @SoonIter in #3519

Other Changes

New Contributors

Full Changelog: v2.0.17...v2.0.18

v2.0.17

Choose a tag to compare

@SoonIter SoonIter released this 08 Jul 11:59
237a9c3

What's Changed

New Features 🎉

  • feat(theme/Link): Add route.useTransitions to opt-out startTransition navigation by @sanjaiyan-dev in #3479
  • feat(core): expose runCLI API by @chenjiahan in #3504
  • feat(theme/Link): support opt-out prefetch via route.prefetchLink by @SoonIter in #3506
  • feat(core): support siteOrigin config to set absoluteUrl cases by @SoonIter in #3466

Bug Fixes 🐞

  • fix(theme/codeblock): avoid list markers when copying code blocks by @maikthomas in #3501
  • fix(theme/Link): startTransition in async behaviour 🔧 by @sanjaiyan-dev in #3503
  • fix(theme/GithubStars): avoid github stars hydration mismatch by @SoonIter in #3505

Other Changes

New Contributors

Full Changelog: v2.0.16...v2.0.17

v2.0.16

Choose a tag to compare

@SoonIter SoonIter released this 03 Jul 08:09
ee123b1

What's Changed

New Features 🎉

  • feat(mdx/container): Support [!IMPORTANT] callout for feature parity with GitHub-flavored markdown by @mnebes in #3493

Bug Fixes 🐞

  • fix(mdx/container): Fix rendering of multi-line GitHub-style alerts by @mnebes in #3487
  • fix(plugin-playground): include source path in mdx parse errors by @SoonIter in #3486

Refactor ðŸ”Ļ

  • refactor(theme): internal code change, replace @theme alias with @rspress/core/theme by @SoonIter in #3492
  • refactor(router): await navigate and opt-in to router useTransition 🧭 by @sanjaiyan-dev in #3476

Document 📖

Other Changes

  • chore(deps): update dependency remark-cjk-friendly-gfm-strikethrough to ^2.3.1 by @renovate[bot] in #3482
  • chore(deps): update dev-tools by @renovate[bot] in #3483
  • chore(deps): update playwright monorepo to v1.61.1 by @renovate[bot] in #3484
  • chore(deps): update all patch dependencies by @renovate[bot] in #3481
  • chore(deps): update github-actions (major) by @renovate[bot] in #3489
  • chore(deps): update dependency react-router-dom to ^7.18.1 by @renovate[bot] in #3463
  • chore(deps): update github-actions by @renovate[bot] in #3488
  • chore(deps): upgrade agent skills to latest commit by @SoonIter in #3495
  • Release v2.0.16 by @SoonIter in #3496

New Contributors

Full Changelog: v2.0.15...v2.0.16

v2.0.15

Choose a tag to compare

@SoonIter SoonIter released this 25 Jun 11:39
796b136

Highlights

🌙 Choose a default theme or disable switching

themeConfig.darkMode can now define both the initial theme and whether visitors may switch it. Use 'dark', 'light', or 'auto' to choose the default while keeping the theme switcher, or use a force-* value to enforce that behavior and hide the switcher.

import { defineConfig } from '@rspress/core';

export default defineConfig({
  themeConfig: {
    darkMode: 'force-dark',
  },
});

Documentation: themeConfig.darkMode

Related PR: #3473

🔗 Catch broken heading links during builds

Enable markdown.link.checkAnchors to fail the build when a same-page, relative, or absolute Markdown/MDX link points to a heading that does not exist. Known exceptions can be ignored with excludes.

import { defineConfig } from '@rspress/core';

export default defineConfig({
  markdown: {
    link: {
      checkAnchors: true,
    },
  },
});

Documentation: markdown.link.checkAnchors

Related PR: #3443

🔍 Exclude individual pages from built-in search

Add search: false to a page's frontmatter to keep utility, hidden, or duplicate pages out of the built-in search index without removing the page itself. This setting only affects Rspress's built-in search.

---
search: false
---

Documentation: Frontmatter search

Related PR: #3456

What's Changed

New Features 🎉

  • feat(search): Allow excluding pages from default search via frontmatter by @elliotcourant in #3456
  • feat(theme/darkMode): support themeConfig.darkMode set default values by @SoonIter in #3473
  • feat(mdx/link): support markdown anchor checks by @SoonIter in #3443

Performance 🚀

  • perf(ssg): avoid eager asset source reads by @SyMind in #3459

Bug Fixes 🐞

  • fix(theme/Nav): render active language as non-link by @SoonIter in #3450
  • fix(core): allow overriding printFileSize config by @SoonIter in #3451
  • fix(auto-nav-sidebar): isolate global sidebar by version by @SoonIter in #3454
  • fix(mdx/title): strip inline markdown in h1 e.g: "# __ReplaceElements" by @SoonIter in #3468
  • fix(theme/inline-code-link): align link styles --rp-c-link and nav gap by @SoonIter in #3474

Refactor ðŸ”Ļ

  • refactor(search): extract helper and add idle callback cleanup â™ŧïļ by @sanjaiyan-dev in #3467
  • refactor(theme): use useLayoutEffect in useNavTransparent for performance🛠ïļ by @sanjaiyan-dev in #3475

Document 📖

Other Changes

New Contributors

Full Changelog: v2.0.14...v2.0.15