Skip to content

Releases: web-infra-dev/rspress

v2.0.0-rc.4

31 Dec 08:06
48515d8

Choose a tag to compare

What's Changed

New Features 🎉

  • feat(ssg-md): support Overview and HomeLayout by @SoonIter in #2933
  • feat(core): add import.meta.env.SSR and import.meta.env.SSG_MD by @SoonIter in #2948
  • feat(theme/nav): support multiple level nested navigation items by @SoonIter in #2943
  • feat(nodejs)!: drop support of node 18, upgrade engines to node >= 20.9.0 by @SoonIter in #2924

Bug Fixes 🐞

  • fix(core): Iterator#map is only available on Node 22+ by @JounQin in #2923
  • fix(theme/Sidebar): sidebar should also listen location changes by @JounQin in #2922
  • fix(theme): improve SSR compatibility by @SoonIter in #2934
  • fix: hover group links should also calc active with matchNavbar by default by @JounQin in #2930
  • fix(theme/Nav): render empty nav items correctly not link by @JounQin in #2929
  • fix(theme/Layout): render beforeNavMenu correctly by @JounQin in #2822
  • fix(ssg-md): use .md links instead of .html in Overview SSG-MD mode by @SoonIter in #2944
  • fix(plugin-algolia): upgrade docsearch and fix the css regression by @SoonIter in #2946
  • fix(theme/Codeblock): revert the code shadow and enhance the separator line by @SoonIter in #2931
  • fix(plugin-algolia): should remove base by @SoonIter in #2949

Document 📖

  • docs: Add wrap vs eject guides for customizing Rspress theme by @Copilot in #2906
  • docs: upgrade custom-theme and add wrap and eject by @SoonIter in #2925
  • docs: upgrade llms.txt and ssg-md by @SoonIter in #2927
  • docs: fix og-image cjk wrong font and title slice logic by @SoonIter in #2919
  • docs: typo translate by @SoonIter in #2932
  • docs: fix the shiki highlighter ansi "/" by @SoonIter in #2947
  • docs: add SSG vs SSG-MD comparison table by @SoonIter in #2950

Other Changes

  • chore(deps): update all patch dependencies by @renovate[bot] in #2938
  • chore(deps): update dependency @docsearch/css to ^4.4.0 by @renovate[bot] in #2939
  • chore(deps): update dependency @docsearch/react to ^4.4.0 by @renovate[bot] in #2941
  • chore(deps): update dependency @rsdoctor/rspack-plugin to v1.4.0 by @renovate[bot] in #2942
  • Release v2.0.0-rc.4 by @SoonIter in #2936

Full Changelog: v2.0.0-rc.3...v2.0.0-rc.4

v2.0.0-rc.3

22 Dec 13:28
e8f5429

Choose a tag to compare

Highlights ✨

🆕️ Support common tags

related PR: #2879

You can use it in the frontmatter, and it also supports customization:

---
tag: new, experimental, ejectable
---
image

🌏 Enable text-autospace: normal; by default

related PR: #2920

The text-autospace CSS property allows you to specify the space applied between Chinese/Japanese/Korean (CJK) and non-CJK characters.

/* If you don't like it, you can cancel it via `:root { text-autospace: unset; }` */
:root {
   text-autospace: normal;
}

What's Changed

New Features 🎉

  • feat(plugin-typedoc): allow customize the docs/api/_meta.json and track in git by @SoonIter in #2869
  • feat(theme/tags): allow frontmatter tag by @SoonIter in #2879
  • feat(theme): add text-autospace: normal; by @SoonIter in #2920

Bug Fixes 🐞

  • fix(core): Fix an issue where llms.txt was not generated when locales was not set by @Karibash in #2866
  • fix(plugin-algolia): add missing constant by @dragomano in #2865
  • fix(theme/Link): add forwardRef for react 18 by @SoonIter in #2871
  • fix(theme/NavScreen): Disable clicks on active language/version entries in mobile nav by @Copilot in #2883
  • fix(cli/eject): fix the component path not right by @SoonIter in #2896
  • fix(theme/CodeBlockRuntime): Render SSR fallback for CodeBlockRuntime to avoid first-paint empty DOM/CLS by @Copilot in #2902
  • fix: do not modify singleton global sidebar by @JounQin in #2911

Document 📖

  • docs(codeblock): a typo by @SoonIter in #2868
  • docs(temp-fix-workaround): add shiki langs for markdown codeblock unstable bundle size by @SoonIter in #2874
  • docs: Polish Rspress V2 bilingual docs for navigation, MDX usage, and UI components by @Copilot in #2875
  • docs: add Chinese guide for llms.txt SSG-MD output by @Copilot in #2877
  • docs: adjust structure by @SoonIter in #2884
  • docs(ui): Add PackageManagerTabs component docs in en/zh UI sections by @Copilot in #2882
  • docs(api): add rspress eject command documentation by @Copilot in #2886
  • docs: Split runtime hook docs into dedicated UI hook pages by @Copilot in #2885
  • docs: describe useSite/usePage runtime hooks by @Copilot in #2887
  • docs: add components by @SoonIter in #2891
  • docs(theme): Clarify LastUpdated configuration and customization guidance by @Copilot in #2901
  • docs: add preview for some codeblocks by @SoonIter in #2907
  • docs: Add usePages and useFrontmatter hook docs with overview example and HMR note by @Copilot in #2905
  • docs: add pluginOg and og-image to rspress docsite by @SoonIter in #2835

Other Changes

  • chore(theme/CodeBlock): add box-shadow to codeblock by @SoonIter in #2863
  • test: use Rstest as Rspress's test framework by @9aoy in #2413
  • chore(theme/Codeblock): beautify the shiki highlight by @SoonIter in #2864
  • chore(theme/Tabs): update style when nested Tabs in Tabs by @SoonIter in #2870
  • chore(create-rspress): Add React 19 dependencies to create-rspress template by @Copilot in #2873
  • chore(deps): upgrade rsbuild and not show warning for __dirname and __filename when bundling for web by @Timeless0911 in #2878
  • chore(deps): update all patch dependencies by @renovate[bot] in #2889
  • chore(deps): update pnpm to v10.25.0 by @renovate[bot] in #2890
  • chore(deps): update shiki monorepo to ^3.20.0 by @renovate[bot] in #2892
  • chore(deps): update actions/cache action to v5 by @renovate[bot] in #2893
  • chore(auto-nav-sidebar): Improve missing page error readability by @Copilot in #2880
  • chore(ci): update playwright test config by @SoonIter in #2897
  • chore: remove unused view transition code by @SoonIter in #2898
  • test(e2e): playwright support lazyCompilation after Rsbuild 1.4.0, remove RSPRESS_LAZY_COMPILATION=false by @SoonIter in #2319
  • chore(theme): better UI for overview items without headers case by @Copilot in #2899
  • refactor(ssg-md): redesign the remarkSplitMdx split logic by @SoonIter in #2903
  • chore: remove unused min-height style by @SoonIter in #2917
  • chore(deps): update dependency react-router-dom to ^7.11.0 by @renovate[bot] in #2914
  • chore(deps): update pnpm to v10.26.1 by @renovate[bot] in #2915
  • chore(deps): update actions/upload-artifact action to v6 by @renovate[bot] in #2916
  • chore(deps): update all patch dependencies - autoclosed by @renovate[bot] in #2913
  • chore(e2e): stable plugin-preview-custom-entry test by @SoonIter in #2918
  • Release v2.0.0-rc.3 by @SoonIter in #2921

Full Changelog: v2.0.0-rc.2...v2.0.0-rc.3

v2.0.0-rc.2

08 Dec 10:54
d938835

Choose a tag to compare

Breaking Changes🚨

theme folder should use @rspress/core/theme-original

related PR: #2860

In Rspress V1 document, @theme is the alias for rspress/theme, but @theme is an alias which points to theme/index.tsx and falls back to rspress/theme.

rspress/theme or @rspress/core/theme points to Rspress's theme-default, they are actually different things.

We standardize this behavior, which is the same as docusaurus.

  1. In docs directory, @theme or @rspress/core/theme should be used, which points to theme/index.tsx and falls back to theme-default

  2. In theme directory , @theme-original or @rspress/core/theme-original should be used, which always points to Rspress's theme-default, used for users to customize themes, which is very useful for users who publish npm theme packages.

 // theme/index.tsx
- import { Layout as BasicLayout } from 'rspress/theme'; // or @rspress/core/theme
+ import { Layout } from '@rspress/core/theme-original';

 const Layout = () => {
    return <BasicLayout {...} />
 }
 
 export { Layout }
- export * from 'rspress/theme' // or @rspress/core/theme
+ export * from '@rspress/core/theme-original';

Merge @theme-assets to @theme

Before

We have a separate entry for exporting @theme-assets

import { SvgWrapper } from '@theme'
import SearchSvg from '@theme-assets/Search';

<SvgWrapper icon={SearchSvg} />

After

@theme-assets has been removed. Icons are exported from @theme and prefixed with Icon, for example: IconSearch

import { SvgWrapper, IconSearch } from '@theme';

<SvgWrapper icon={IconSearch} />
                   ^? type Icon = React.FC<React.SVGProps<SVGSVGElement>> | string;

Refactor @rspress/plugin-preview and simplify usage

related PR: #2806

Before: Required declarations in both config file and MDX file.

pluginPreview({
  previewMode: 'iframe',
  iframeOptions: { position: 'fixed' },
});
```tsx preview

```

After: Only declare in the MDX file.

```tsx preview="iframe-fixed"

```

What's Changed

New Features 🎉

  • feat(plugin-preview)!: simplify the usage via tsx preview="iframe-fixed" and support hmr by @SoonIter in #2806
  • feat(plugin-preview): should support dark mode by @SoonIter in #2816
  • feat(i18n): add Russian translation for built-in i18n text by @dragomano in #2827
  • feat(rspack)!: revert Rspack native watcher by default by @Timeless0911 in #2830
  • feat(plugin-typedoc): Upgrade to TypeDoc v0.28 with new API by @Karibash in #2790
  • feat(mdx): support absolute paths with <root>/ prefix in remarkFileCodeBlock by @Copilot in #2665
  • feat(theme)!: custom theme should use @rspress/core/theme-original by @SoonIter in #2860
  • feat(theme/Root): add ejectable component to theme by @Copilot in #2858
  • feat(theme/Toc): Add data-depth attribute to TOC items by @Copilot in #2859
  • feat(plugin-typedoc): Add setup callback for TypeDoc customization by @Karibash in #2841

Performance 🚀

  • perf(theme/useWindowSize): optimize useWindowSize with debounce to reduce resize handler calls by @Copilot in #2849

Bug Fixes 🐞

  • fix(theme): css vars color by @SoonIter in #2791
  • fix(theme): table should be scrollable and startTransition should not be a html attribute by @SoonIter in #2792
  • fix(theme): th width should be same with td by @SoonIter in #2804
  • fix(theme): plugin-preview should hide the toc by @SoonIter in #2803
  • fix(theme/Sidebar): pass down onClick prop by @JounQin in #2811
  • fix(plugin-twoslash): Make twoslashOptions optional by @Karibash in #2819
  • fix(ssg): wrong html selector for crawlers regression due to [email protected] progressiveChunkSize change by @SoonIter in #2831
  • fix(theme/callout): link in callout should use currentColor by @SoonIter in #2838
  • fix(plugin-typedoc): allow typedoc plugin interface as usual by @SoonIter in #2836
  • fix(theme/outline): line-height of toc item by @SoonIter in #2840
  • fix(cli): should not restart when public folder change files by @SoonIter in #2847
  • fix(core): Fix an issue where the PackageManagerTabs component outputs broken Markdown by @Karibash in #2861

Document 📖

  • docs: update package manager command from beta to rc by @chenjiahan in #2800
  • docs: Add "new" tag to plugin documentation for new v1 plugins by @Copilot in #2851

Other Changes

  • chore(theme/doc): add border to inline text code by @SoonIter in #2796
  • chore(deps)!: update dependency react-router-dom to v7 by @renovate[bot] in #1802
  • chore(deps): update actions/checkout digest to 34e1148 by @renovate[bot] in #2798
  • chore(deps): update all patch dependencies by @renovate[bot] in #2799
  • chore(deps): update dependency @rstack-dev/doc-ui to ^1.12.0 - autoclosed by @renovate[bot] in #2802
  • chore(deps): update dependency @rslib/core to v0.18.0 by @renovate[bot] in #2801
  • chore(infra): use @rslib/core preserveModules by @SoonIter in #2805
  • chore(build): enable redirect.dts.extension to fix type issue by @Timeless0911 in #2814
  • chore(deps): update dependency prettier to v3.7.3 by @renovate[bot] in #2825
  • chore(deps): update all patch dependencies by @renovate[bot] in #2824
  • chore: fix the diff.yml event by @yifancong in #2828
  • chore(theme): export FallbackHeading for reusing by @JounQin in #2813
  • chore: bump pnpm 10.24.0 and remove trust policy config by @Timeless0911 in #2829
  • chore(deps): update actions/checkout action to v6 by @renovate[bot] in #2833
  • chore(deps): update actions/setup-node action to v6 by @renovate[bot] in #2834
  • chore(theme/Tabs): upgrade hover style by @SoonIter in #2837
  • chore(deps): update all patch dependencies by @renovate[bot] in #2842
  • chore(deps): update dependency lint-staged to v16 by @renovate[bot] in #2844
  • chore(deps): update playwright monorepo to v1.57.0 by @renovate[bot] in #2843
  • chore(theme/Table): narrow table padding by @SoonIter in #2845
  • chore(Theme/outline): add shadow by @SoonIter in #2846
  • chore(plugin-algolia): Add Russian translation for plugin-algolia by @dragomano in #2832
  • chore(core): truncate some error stack traces to 5 lines by @Copilot in #2821
  • chore(build): use advanced ESM by @Timeless0911 in #2848
  • chore(deps): update dependency cspell to ^9.4.0 by @renovate[bot] in #2854
  • chore(deps): update all patch dependencies by @renovate[bot] in #2853
  • chore(deps): update dependency react-router-dom to ^7.10.1 by @renovate[bot] in #2855
  • chore(deps): update dependency rimraf to ^6.1.2 by @renovate[bot] in #2856
  • Release v2.0.0-rc.2 by @SoonIter in #2862

New Contributors

Full Changelog: v2.0.0-rc.1...v2.0.0-rc.2

v1.47.0

08 Dec 03:15
8097b29

Choose a tag to compare

What's Changed

New Features 🎉

  • feat(plugin-preveiw): allow users customize pluginLess and pluginSass by @SoonIter in #2823
  • feat(plugin-preview): add otherFiles attr to fixed-with-per-comp by @SoonIter in #2850

Other Changes

Full Changelog: v1.46.2...v1.47.0

v1.46.2

27 Nov 11:50
079fc81

Choose a tag to compare

What's Changed

Bug Fixes 🐞

  • fix(plugin-preview): iframe url and outline not change when navigating other page by @SoonIter in #2815

Other Changes

Full Changelog: v1.46.1...v1.46.2

v2.0.0-rc.1

19 Nov 11:51
77e8041

Choose a tag to compare

What's Changed

New Features 🎉

  • feat(theme): add transition isPending UI to Sidebar by @SoonIter in #2778
  • feat(plugin-twoslash): Make it possible to configure compilerOptions for TypeScript in twoslash by @Karibash in #2773

Bug Fixes 🐞

Other Changes

Full Changelog: v2.0.0-rc.0...v2.0.0-rc.1

v2.0.0-rc.0

17 Nov 09:12

Choose a tag to compare

Highlights ✨

💄 Brand new theme

related PR: #2738, #2719, #2698, #2690, #2533, #2656

1. BEM classname 🕶

All built-in components now adopt BEM naming. This is a rather old-school choice, but a deliberate one based on user feedback.

Compared with Tailwind CSS, it allows you to flexibly adjust styles anywhere using standard CSS selectors, without restrictions.
For user-side customized doc components, you are free to choose any styling approach — including Tailwind CSS — without worrying about conflicts with Rspress’s default styles.


2. Built-in Default i18n Text 🌏

related PR: #2738

The new theme includes a set of default translation strings and supports "treeshaking" based on the languages configured in your project:

  • If your documentation includes only en and zh, only those languages will be bundled.

  • For languages not supported by Rspress, it automatically falls back to en.

In most cases, you barely need to configure any i18n text manually, which significantly improves usability. You only need to configure i18nSource in rspress.config.ts when a language is missing or when you want to override built-in texts.

In 2.0.0-rc.0, based on contributions from the community, Rspress now includes four built-in languages: zh, en, ja, and ko.

Welcome more contributors to help improve and expand the default language texts.

More info: #1891 (comment)


3. More CSS Variables 💄

Rspress now exposes additional CSS variables covering theme colors, shiki, code blocks, the homepage, and more — greatly enhancing customization capabilities.

You can experiment with them interactively at https://v2.rspress.rs/ui/vars, preview the results in real time, and copy the variables directly into your project.


4. rspress eject 🆕

related PR: #2726

rspress eject is a brand-new CLI command that copies the source code of Rspress’s built-in components into your project’s theme/components directory.

For example:

rspress eject DocFooter

This gives you the full source of the DocFooter component, enabling you to customize it freely, such as adding license information.

Deep customization becomes effortless.

The rspress eject feature is still in testing, and we’ll continue improving the documentation and providing more good customization examples.


5. Improved Documentation Reading Experience 📖

Most colors and visual styles have been redesigned and refined by our designers, significantly enhancing the overall visual appeal and reading experience.

What's Changed

New Features 🎉

  • feat(theme)!: fully theme refactor by @SoonIter in #2533
  • feat(theme): add Banner Component by @SoonIter in #2654
  • feat(theme)!: add CodeBlock / CodeButtonGroup components and migrate .rp-doc-outline to rp-toc-include by @SoonIter in #2656
  • feat(theme): add Deno support to PackageManagerTabs component by @Copilot in #2663
  • style: deno svg adapt to dark mode by @Timeless0911 in #2676
  • feat: add new Component and fix link should have search query by @SoonIter in #2683
  • feat: ssg-md by @SoonIter in #2666
  • feat(plugin-twoslash): add cache options by @Timeless0911 in #2712
  • feat(theme)!: add config.i18nSource and default i18n text and remove serveral i18nKeys in themeConfig by @SoonIter in #2738
  • feat(codeblock): lineNumbers and wrapCode meta props support '''tsx lineNumbers wrapCode by @Copilot in #2746
  • feat(CLI): Add rspress eject CLI command for theme component customization by @Copilot in #2726
  • feat(theme): add pageType: doc-wide by @SoonIter in #2759

Performance 🚀

Bug Fixes 🐞

  • fix(theme): add --rp-banner-height to scroll-padding-top by @SoonIter in #2678
  • fix(theme/Tabs): keepDOM default value should be true by @SoonIter in #2682
  • fix(theme/code): fix the table code font-size and separate inline-code-block and code-block by @SoonIter in #2688
  • fix(theme): hydration error in NavHamburger and fix Search color by @SoonIter in #2697
  • fix(theme)!: add frontmatter UI control back and remove uiSwitch by @SoonIter in #2698
  • fix(theme): OverviewGroup and title margin by @SoonIter in #2699
  • fix(theme/Banner): cannot be closed due to hydration error by @SoonIter in #2703
  • fix(mdx): preserve error stack traces from MDX plugins and limit output to 10 lines by @Copilot in #2711
  • fix(mdx): error stack is empty by @SoonIter in #2716
  • fix(theme): Outline font family was hardcoded by @elliotcourant in #2739
  • fix(plugin-preview): @theme module not found regression by @SoonIter in #2741
  • fix(theme): use pointer cursor for menu by @fi3ework in #2750
  • fix: pathnameToRouteService to handle URLs with hash and search parameters by @Copilot in #2743
  • fix: do not expose scrollToTarget as public API by @SoonIter in #2761
  • fix(theme): Edit link should show by @SoonIter in #2763

Document 📖

Other Changes

  • chore(theme): migrate more .module.scss to BEM and remove tailwind CSS by @SoonIter in #2653
  • chore(deps): update dependency create-rstack to v1.7.0 by @renovate[bot] in #2668
  • chore(deps): update all patch dependencies by @renovate[bot] in #2667
  • chore(deps): update playwright monorepo to v1.56.1 by @renovate[bot] in #2670
  • chore(deps): update dependency memfs to ^4.49.0 by @renovate[bot] in #2669
  • chore(deps): upgrade to [email protected] (react,react-dom,@types/react,@types/react-dom) by @SoonIter in #2671
  • chore(theme/Tabs): keepDOM in Tabs and stablize the Tabs classname by @SoonIter in #2679
  • chore(deps): update all patch dependencies by @renovate[bot] in #2684
  • chore(deps): update dependency @biomejs/biome to ^2.3.1 by @renovate[bot] in #2685
  • chore(deps): update dependency @rsbuild/plugin-vue to ^1.2.0 by @renovate[bot] in #2686
  • chore(deps): update dependency @rslib/core to v0.16.1 by @renovate[bot] in #2687
  • chore!: move @rspress/theme-default to @rspress/core/theme by @SoonIter in #2690
  • chore(theme/HomeLayout): polish styles by @SoonIter in #2693
  • chore(theme/Search): add backdrop-filter by @SoonIter in #2696
  • chore(deps): update flexsearch to v0.8.212 by @Copilot in #2691
  • chore(deps): update all patch dependencies by @renovate[bot] in #2706
  • chore(deps): update dependency @rsbuild/core to ~1.6.0 by @renovate[bot] in #2707
  • chore(remarkContainerSyntax): throw an error when the type is unknown by @Copilot in #2708
  • chore: preEntry to ensures css order and splitChunks for perf by @SoonIter in #2714
  • ci: add ecosystem CI by @fi3ework in #2710
  • refactor(theme/Tabs)!: reimplement Tabs and PageTabs to bypass hydration error due to localStorage by @SoonIter in #2719
  • chore(theme/sidebar): use 1fr to toggleCollapse the sidebarGroup by @SoonIter in #2723
  • chore(theme/Toc): upgrade Toc border line in mobile by @SoonIter in #2724
  • chore(infra): add Rsdoctor bundle diff CI by @yifancong in #2722
  • chore(theme/homehero): upgrade home feature style and expose CSS vars by @SoonIter in https://github.com/web-infra-dev/r...
Read more

v2.0.0-beta.35

30 Oct 12:59

Choose a tag to compare

v2.0.0-beta.35 Pre-release
Pre-release

What's Changed

New Features 🎉

  • feat(theme): add prop dlx to PackageManagerTabs for npx pnpm dlx etc by @Nsttt in #2623
  • feat(auto-nav-sidebar): add new type: "dir-section-header" by @SoonIter in #2643
  • chore: cherry-pick ssg-md to beta.34 in #2680

Bug Fixes 🐞

  • fix(auto-nav-sidebar): should extract tag and fix the chunks word break by @SoonIter in #2652

Document 📖

Other Changes

  • chore(deps): update all patch dependencies by @renovate[bot] in #2629
  • chore(deps): update dependency memfs to ^4.47.0 by @renovate[bot] in #2631
  • chore(deps): update pnpm to v10.17.1 by @renovate[bot] in #2632
  • chore(deps): update dependency @rslib/core to v0.15.0 by @renovate[bot] in #2630
  • chore(deps): update dependency @microsoft/api-extractor to ^7.53.0 by @renovate[bot] in #2637
  • chore(deps): update all patch dependencies by @renovate[bot] in #2636
  • chore(deps): update dependency cross-env to ^10.1.0 by @renovate[bot] in #2638
  • chore(deps): update dependency memfs to ^4.48.1 by @renovate[bot] in #2639
  • chore(deps): update pnpm to v10.18.0 by @renovate[bot] in #2641
  • chore(deps): update dependency nx to v21.6.3 by @renovate[bot] in #2640
  • chore(deps): update all patch dependencies by @renovate[bot] in #2648
  • chore(deps): update dependency @docsearch/css to ^4.2.0 by @renovate[bot] in #2649
  • chore(deps): update dependency tm-themes to v1.10.11 by @renovate[bot] in #2650
  • chore(deps): update dependency @docsearch/react to ^4.2.0 by @renovate[bot] in #2651

New Contributors

Full Changelog: v2.0.0-beta.34...v2.0.0-beta.35

v1.46.1

11 Nov 06:10
c3539ac

Choose a tag to compare

What's Changed

Bug Fixes 🐞

Other Changes

Full Changelog: v1.46.0...v1.46.1

v1.46.0

04 Nov 10:08
76ee5f3

Choose a tag to compare

What's Changed

Bug Fixes 🐞

  • fix(theme): avoid circular dependency and ensure CSS orders via add preEntry by @SoonIter in #2713

Other Changes

Full Changelog: v1.45.8...v1.46.0