v2.0.0-rc.0
Highlights β¨
π Brand new theme
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-outlinetorp-toc-includeby @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
cacheoptions by @Timeless0911 in #2712 - feat(theme)!: add
config.i18nSourceand default i18n text and remove serveral i18nKeys in themeConfig by @SoonIter in #2738 - feat(codeblock): lineNumbers and wrapCode meta props support
'''tsx lineNumbers wrapCodeby @Copilot in #2746 - feat(CLI): Add
rspress ejectCLI command for theme component customization by @Copilot in #2726 - feat(theme): add pageType: doc-wide by @SoonIter in #2759
Performance π
- perf: simple matchRoutes alternative #1863 by @SoonIter in #2673
- perf(ssg): regression after output.asyncChunks = true by @SoonIter in #2674
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 π
- docs: stabilize the codeblock css vars by @SoonIter in #2689
- docs: update logo references to use SVG version by @chenjiahan in #2737
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-defaultto@rspress/core/themeby @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 #2728
- chore: fix diff yaml by @yifancong in #2732
- chore(deps): update all patch dependencies by @renovate[bot] in #2733
- chore(deps): update dependency @docsearch/css to ^4.3.1 by @renovate[bot] in #2734
- chore(deps): update dependency @microsoft/api-extractor to ^7.54.0 by @renovate[bot] in #2736
- chore(deps): update dependency @docsearch/react to ^4.3.1 by @renovate[bot] in #2735
- chore(theme): expose base css variables by @SoonIter in #2731
- chore(plugin-api-docgen): add default translation text for table comp associated with i18n refactor by @SoonIter in #2744
- test: remove unused files by @SoonIter in #2745
- chore(theme/Tabs): polish Tabs style to ::after instead of border-bottom by @SoonIter in #2748
- security: enable pnpm's no-downgrade trustPolicy by @Timeless0911 in #2751
- chore(infra): run pnpm dedupe by @SoonIter in #2752
- chore(theme): simplify scss structure by @SoonIter in #2753
- chore(ssg): add filepath error message by @SoonIter in #2754
- chore(theme): polish theme colors by @SoonIter in #2755
- chore: update pnpm trust policy exclusions by @Timeless0911 in #2758
- chore(mdx): revert containerSynatx unknown types error by @SoonIter in #2764
- chore(deps): update all patch dependencies by @renovate[bot] in #2766
- chore(deps): update dependency @microsoft/api-extractor to ^7.55.0 by @renovate[bot] in #2767
- chore(deps): update dependency cspell to ^9.3.2 by @renovate[bot] in #2768
- chore(deps): update dependency memfs to ^4.51.0 by @renovate[bot] in #2769
- chore(deps): update dependency @rslib/core to v0.17.2 by @renovate[bot] in #2760
New Contributors
- @elliotcourant made their first contribution in #2739
Full Changelog: v2.0.0-beta.35...v2.0.0-rc.0