Releases: web-infra-dev/rspress
v2.0.0-beta.10
What's Changed
Bug Fixes π
Document π
Other Changes
- refactor: unify all the virtual-global-styles to ensure the css order by @SoonIter in #2227
- Release v2.0.0-beta.10 by @SoonIter in #2233
Full Changelog: v2.0.0-beta.9...v2.0.0-beta.10
v2.0.0-beta.9
What's Changed
New Features π
Performance π
Bug Fixes π
- fix: exclude
.rspress-toc-exclude
ancestor nodes in dynamic TOC by @JounQin in #2212 - fix: empty blockquote crash the compiler by @zoolsher in #2221
- fix(ssg): expose the error stack hiden by Suspense by @SoonIter in #2219
- fix: add rehype codeMeta plugin back but shiki compatible metastring property instead by @JounQin in #2222
Document π
- docs: switch to new domain by @chenjiahan in #2218
Other Changes
- refactor: @rspress/theme-default should use bundleless dist structure by @SoonIter in #2216
- refactor(virtual-module): remove 'virtual-routes-ssr' module, unify virtual-routes-ssr into virtual-routes module by @SoonIter in #2217
Full Changelog: v2.0.0-beta.8...v2.0.0-beta.9
v2.0.0-beta.8
Highlightsβ¨
Add <CodeBlockRuntime /> component for dynamic code block highlighting
This is an escape hatch, which can be used for dynamic code block highlighting when the shiki highlighting at compile time does not meet your needs.
import { CodeBlockRuntime } from '@theme';
import { transformerNotationHighlight } from '@shikijs/transformers';
<CodeBlockRuntime
lang="ts"
title="highlight.ts"
code={`console.log('Highlighted'); // [!code highlight]
// [!code highlight:1]
console.log('Highlighted');
console.log('Not highlighted');`}
shikiOptions={{
transformers: [transformerNotationHighlight()],
}}
/>
What's Changed
New Features π
- feat: enable
rehype-raw
plugin by default by @JounQin in #2199 - feat(CodeBlockRuntime): add shikiOptions prop by @SoonIter in #2208
- feat(plugin-shiki): add @rspress/plugin-shiki/transformers exports and transformerCompatibleMetaHighlight by @SoonIter in #2209
- feat(CodeBlockRuntime): add onRendered prop by @SoonIter in #2211
Bug Fixes π
- fix(CodeBlockRuntime): CodeBlockRuntime should render the same dom structure with compile-time code block by @SoonIter in #2206
Other Changes
- fix:
children
should be unavailable forCodeBlockRuntime
by @JounQin in #2205 - Revert "feat: enable
rehype-raw
plugin by default (#2199)" by @SoonIter in #2207 - Release v2.0.0-beta.8 by @SoonIter in #2210
Full Changelog: v2.0.0-beta.7...v2.0.0-beta.8
v2.0.0-beta.7
What's Changed
New Features π
- feat(plugin-shiki): upgrade to shiki@^3.4.2 to support langAlias option by @SoonIter in #2177
- feat: add new
CodeBlockRuntime
component by @JounQin in #2190
Bug Fixes π
- fix(theme-default): improve redirect URL handling in NotFoundLayout by @HyaCiovo in #2184
- fix(theme-default): export type CodeButtonGroupProps by @SoonIter in #2188
- fix(plugin-llms): support usage in
ssg: false
by @SoonIter in #2194 - fix: sidebar type=file with data-context by @zoolsher in #2189
- fix(plugin-shiki/style): for force wrap style by @SoonIter in #2195
Document π
- docs: update Rstack introduction by @chenjiahan in #2179
- docs: incorrect usage of
socialLinks
by @JounQin in #2192
Other Changes
- chore(deps): upgrade to "@types/node": "^22.8.1" by @SoonIter in #2178
- chore(deps): update all patch dependencies by @renovate in #2200
- chore(deps): update dependency @rslib/core to v0.8.0 by @renovate in #2201
- chore(plugin-algolia): highlight color can be changed by theme color by @SoonIter in #2203
- refactor(virtual-module): migrate the routeList virtual-route and virtual-route-ssr by @SoonIter in #2197
- Release v2.0.0-beta.7 by @SoonIter in #2204
New Contributors
Full Changelog: v2.0.0-beta.6...v2.0.0-beta.7
v2.0.0-beta.6
What's Changed
New Features π
- feat: update Rsbuild 1.3.18 and set caller name by @chenjiahan in #2139
- feat(theme): expose classname for crawler by @SoonIter in #2161
- feat(core): support md definition syntax url by @SoonIter in #2164
- feat: support
file://
protocol andURL
for icon by @JounQin in #2167
Performance π
- perf: remove React 17 compatibility code by @chenjiahan in #2174
Bug Fixes π
- fix(deps): remove unused react-syntax-highlighter by @chenjiahan in #2138
- fix(plugin-api-doc-gen): plugin-api-doc-gen should have anchor (#2140) by @SoonIter in #2146
- fix(shiki): shiki langs perf regression by @SoonIter in #2151
- fix(theme): highlight the manually by @SoonIter in #2153
- fix(core/mdx-loader): due to frontmatter stack error loc and remove useless hmr old codes by @SoonIter in #2168
- fix(shiki/css): add diff language token and remove useless prism token by @SoonIter in #2175
Document π
- docs: replace
Helmet
withHead
by @jbroma in #2150 - docs: update website contributing guide by @chenjiahan in #2157
- docs(algolia): update index name by @SoonIter in #2163
- docs: add Rstest to homepage by @chenjiahan in #2169
Other Changes
- chore(deps): update all patch dependencies by @renovate in #2144
- chore(plugin-shiki): add all builtin-langs in shiki by @SoonIter in #2148
- chore(theme): rename Pre -> PreWithCodeButtonGroup, the only element that differs from the original element by @SoonIter in #2162
- Release v2.0.0-beta.6 by @SoonIter in #2176
Full Changelog: v2.0.0-beta.5...v2.0.0-beta.6
v1.44.0
What's Changed
New Features π
- feat: update Rsbuild 1.3.18 and set caller name by @JounQin in #2141
- feat(plugin-preview): add iframePostion 'fixed-with-per-comp' by @SoonIter in #2152
Bug Fixes π
- fix(plugin-api-doc-gen): plugin-api-doc-gen should have anchor by @SoonIter in #2140
- fix(plugin-playground): disable monaco editor ts check for supporting tsx #2028 by @SoonIter in #2147
Other Changes
Full Changelog: v1.43.13...v1.44.0
v2.0.0-beta.5
Highlightsβ¨
Use shiki v3 by default, drop prism support
Migrate all code highlighting from prism to shiki in compile time. It is worth noting that some code block syntax will be changed, e.g transformerNotationHighlight
More info: #1891 (comment)
before
import { defineConfig } from 'rspress/config';
import { pluginShiki, createTransformerLineNumber, createTransformerDiff } from '@rspress/plugin-shiki';
export default defineConfig({
plugins: [
pluginShiki({
transformers: [
createTransformerLineNumber(),
createTransformerDiff(),
// createTransformerErrorLevel(),
// createTransformerHighlight(),
// createTransformerFocus(),
],
}),
],
});
after
import { defineConfig } from 'rspress/config';
import {
transformerNotationDiff,
} from '@shikijs/transformers';
export default defineConfig({
markdown: {
showLineNumber: true,
shiki: {
transformers: [
transformerNotationDiff(),
// transformerNotationErrorLevel(),
// transformerNotationFocus(),
// transformerNotationHighlight(),
],
}
}
});
Support JSON schema for _meta.json
related PR: #2079
Now you can get type hints in the IDE. For example, in VSCode you can set
// .vscode/settings.json
{
//...
"json.schemas": [
{
"fileMatch": ["**/_meta.json"],
"url": "./node_modules/rspress/meta-json-schema.json"
// or "url": "https://unpkg.com/[email protected]/meta-json-schema.json"
}
],
// ...
}
What's Changed
New Features π
- feat!: support shiki by default, drop prism support by @SoonIter in #2122
- feat: add
_meta.json
json schema inrspress/meta-json-schema.json
by @SoonIter in #2079 - feat(theme/dynamic-toc): add .rspress-toc-exclude escape hatch by @SoonIter in #2136
Bug Fixes π
Document π
Other Changes
Full Changelog: v2.0.0-beta.4...v2.0.0-beta.5
v1.43.13
What's Changed
New Features π
Document π
- docs: add v2 website link to v1 website by @chenjiahan in #2099
Other Changes
Full Changelog: v1.43.12...v1.43.13
v2.0.0-beta.4
Highlightsβ¨
Enable dev.lazyCompilation: true
by default
related PR: #2123
1. startup instantly
startup time 50xβ faster with lazyCompilation: true
before 3.80sβ

after 0.05sβ

2. When preload
meets lazyCompilation
magic, a magical chemical burst out
Rspress will preload the corresponding route when hovering over the link, then a magical chemical reaction bursts out between lazyCompilation and preload, enabling a seamless refresh experience.

What's Changed
New Features π
- feat: add
localeRedirect: 'only-default-lang'
support by @JounQin in #2125 - feat!: enable
dev.lazyCompilation: true
by default by @SoonIter in #2123 - feat: upgrade create-rspress to support
npm create rspress@beta
by @SoonIter in #2128
Bug Fixes π
- fix(plugin-llms): group routes correctly without locales config by @jbroma in #2116
- fix(theme/dynamic-toc): should abandon all elements with
display: none
. by @SoonIter in #2119 - fix: the pkg type error in moduleResolution: node16 by @SoonIter in #2127
Other Changes
- chore(deps): update dependency cspell to ^8.19.4 by @renovate in #2118
- chore(deps): update all patch dependencies by @renovate in #2117
- chore(deps): update Rsbuild to v1.3.16 by @chenjiahan in #2120
- chore(deps): migrate react-helmet to @unhead/[email protected] by @SoonIter in #2121
- Release v2.0.0-beta.4 by @SoonIter in #2130
Full Changelog: v2.0.0-beta.3...v2.0.0-beta.4
v2.0.0-beta.3
Highlights β¨
Support dynamic TOC generation
related PR: #2018
It brings the application of the mdx component to a new level, ships lots of features and closes lots of issues
1. Support mdx with <Tabs />

2. Support the <Badge />
in Title
e.g:
// foo.mdx
## Title <Badge>Required</Badge>


What's Changed
New Features π
Bug Fixes π
Document π
Other Changes
- chore(deps): update all patch dependencies by @renovate in #2103
- chore(deps): update dependency @changesets/cli to ^2.29.2 by @renovate in #2104
- chore(deps): update dependency @rstack-dev/doc-ui to v1.8.0 by @renovate in #2106
- chore(deps): update dependency create-rstack to v1.4.0 by @renovate in #2107
- chore(deps): update playwright monorepo to v1.52.0 by @renovate in #1782
- refactor(mdx-loader): remove flattenMdxContent in loader by @SoonIter in #2101
- chore(plugin-llms): reduce pkg size by external deps by @SoonIter in #2110
- chore(deps): migrate react-helmet-async to @dr.pogodin/react-helmet by @SoonIter in #2111
- Release v2.0.0-beta.3 by @SoonIter in #2112
New Contributors
Full Changelog: v2.0.0-beta.2...v2.0.0-beta.3