Releases: web-infra-dev/rspress
v1.43.5
What's Changed
Bug Fixes 🐞
- fix: failed to update search index after switching lang by @chenjiahan in #1950
Full Changelog: v1.43.4...v1.43.5
v2.0.0-alpha.2
What's Changed
Breaking Changes 🚨 and highlights ⭐️
Upgrade shiki V3 and use shiki transformers
related PR: #1672
import { defineConfig } from 'rspress/config';
import { pluginShiki, createTransformerDiff } from '@rspress/plugin-shiki';
+ import {
+ transformerNotationDiff,
+ transformerNotationErrorLevel,
+ transformerNotationFocus,
+ transformerNotationHighlight,
+ } from '@shikijs/transformers';
export default defineConfig({
plugins: [
pluginShiki({
transformers: [
// add as needed
- createTransformerDiff(),
- // createTransformerLineNumber(),
- // createTransformerErrorLevel(),
- // createTransformerHighlight(),
- // createTransformerFocus(),
+ createTransformerLineNumber(),
+ // transformerNotationDiff(),
+ // transformerNotationErrorLevel(),
+ // transformerNotationHighlight(),
+ // transformerNotationFocus(),
],
}),
],
});
Support algolia search by "@rspress/plugin-algolia"
related PR: #1909
Installation
npm add @rspress/plugin-algolia -D
Usage
First, add the following configuration to your config file:
// rspress.config.ts
import path from 'path';
import { defineConfig } from 'rspress';
import { pluginAlgolia } from '@rspress/plugin-algolia';
export default defineConfig({
plugins: [pluginAlgolia()],
});
// theme/index.tsx
import { Search as PluginAlgoliaSearch } from '@rspress/plugin-algolia/runtime';
const Search = () => {
return (
<PluginAlgoliaSearch
docSearchProps={{
appId: 'R2IYF7ETH7', // Replace with your own Algolia appId
apiKey: '599cec31baffa4868cae4e79f180729b', // Replace with your own Algolia apiKey
indexName: 'docsearch', // Replace with your own Algolia indexName
}}
/>
);
};
export { Search };
export * from 'rspress/theme';
Builtin Sass and Less plugins removed
related PR: #1937
Rspress 2.0 no longer has Rsbuild's Less and Sass plugins built into it. You can manually install and register plugins to support Sass and Less.
- Sass:
// rspress.config.ts
import { defineConfig } from 'rspress/config';
import { pluginSass } from '@rsbuild/plugin-sass';
export default defineConfig({
builderPlugins: [pluginSass()],
});
- Less:
// rspress.config.ts
import { defineConfig } from 'rspress/config';
import { pluginLess } from '@rsbuild/plugin-less';
export default defineConfig({
builderPlugins: [pluginLess()],
});
New Features 🎉
- feat!(plugin-shiki): bump shiki to v3, migrate to official transformers by @JounQin in #1672
- feat: expose builder preview result for programming usage by @JounQin in #1944
- feat(plugin-algolia): add plugin-algolia and optimize some DX on customizing Search by @SoonIter in #1909
Bug Fixes 🐞
- fix: remove async fs to avoid empty global style by @SoonIter in #1934
- fix: rework sidebar menu responsive issues by @JounQin in #1928
- fix(cli): should catch build errors by @chenjiahan in #1938
- fix(mdxjs): not need to add base on normalizing links with base enabled by @JounQin in #1943
- fix!: remove the builtin Sass and Less plugins by @chenjiahan in #1937
- fix(core): memfs should be dev dependency by @chenjiahan in #1946
- fix(theme): unset overflow style when sidebar destroy by @quanquan2100 in #1949
- fix: failed to update search index after switching lang by @chenjiahan in #1950
Other Changes
- chore(theme): replace with <></>, rename
SideMenu
toSidebarMenu
by @SoonIter in #1932 - Release v2.0.0-alpha.2 by @SoonIter in #1947
New Contributors
- @quanquan2100 made their first contribution in #1949
Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2
v1.43.4
v1.43.3
v2.0.0-alpha.1
What's Changed
Bug Fixes 🐞
- fix: remove outdated hero default values by @chenjiahan in #1927
- fix: Revert "fix: display outline correctly on >=960px <=1280px screen width (#1914)" by @SoonIter in #1929
Other Changes
- chore(plugin-algolia): correct peer dependency version by @chenjiahan in #1925
- chore: use pnpm instead of npx by @JounQin in #1921
- chore(deps): update dependency @rsbuild/core to v1.2.16 by @renovate in #1926
- Release v2.0.0-alpha.1 by @SoonIter in #1931
Full Changelog: v2.0.0-alpha.0...v2.0.0-alpha.1
v1.43.2
v2.0.0-alpha.0
What's Changed
Breaking Changes 🚨
-
Use named export instead of default export in customizing theme (#1873)
If you want to customize theme, please use named export as below:
before
Layout
HomeLayout
setup
DocLayout
use default export,other components use named export
import Theme from 'rspress/theme'; const Layout = () => <Theme.Layout beforeNavTitle={<div>some content</div>} />; export default { ...Theme, Layout, }; export * from 'rspress/theme';
after
all the components use named export
import { Layout as BasicLayout } from 'rspress/theme'; const Layout = () => <BasicLayout beforeNavTitle={<div>some content</div>} />; // use named export, no need to `export default` export { Layout }; export * from 'rspress/theme';
New Features 🎉
- feat(nav): improve dropdown menu interaction by @chenjiahan in #1910
- feat(theme)!: use named export instead of default export, for circular imports by @SoonIter in #1873
Performance 🚀
- perf(search): add index async to avoid blocking the main thread by @chenjiahan in #1892
- perf(search): remove group calculation by @chenjiahan in #1893
- perf: use
matchPath
rather thanmatchRoutes
, remove unused group.title by @SoonIter in #1895 - perf(search): improve initialization and prefetching logic by @chenjiahan in #1899
Bug Fixes 🐞
- fix(plugin-api-docgen): add Russian support by @liamli-0822 in #1890
- fix(search): should use
index.searchAsync
by @chenjiahan in #1898 - fix: display outline correctly on >=960px <=1280px screen width by @JounQin in #1914
Document 📖
- docs: improve Rsbuild plugin guides by @chenjiahan in #1900
- docs: enhance runtime API with types and dark mode usages by @chenjiahan in #1906
- docs: replace generic framework references with Rspress by @chenjiahan in #1907
Other Changes
- chore(deps): update dependency rimraf to v6 by @renovate in #1804
- chore(deps): update all patch dependencies by @renovate in #1902
- chore(deps): update dependency @changesets/cli to ^2.28.1 by @renovate in #1903
- chore(deps): update dependency @microsoft/api-extractor to ^7.51.1 by @renovate in #1904
- chore(deps): update all patch dependencies by @renovate in #1908
- Release v2.0.0-alpha.0 by @SoonIter in #1917
New Contributors
- @liamli-0822 made their first contribution in #1890
Full Changelog: v1.43.0...v2.0.0-alpha.0
v1.43.1
What's Changed
Bug Fixes 🐞
- fix: display outline correctly on >=960px <=1280px screen width by @JounQin in #1918
- fix(plugin-api-docgen): add Russian support (by @liamli-0822 #1890) cherry-picked by @SoonIter in #1919
Other Changes
- chore: update workflows to support 1.x branch by @chenjiahan in #1913
- Release v1.43.1 by @SoonIter in #1920
Full Changelog: v1.43.0...v1.43.1
v1.43.0
What's Changed
New Features 🎉
- feat(nav): improve dropdown menu interaction by @chenjiahan in #1910
Performance 🚀
- perf(search): add index async to avoid blocking the main thread by @chenjiahan in #1892
- perf(search): remove group calculation by @chenjiahan in #1893
- perf: use
matchPath
rather thanmatchRoutes
, remove unused group.title by @SoonIter in #1895 - perf(search): improve initialization and prefetching logic by @chenjiahan in #1899
Bug Fixes 🐞
- fix(search): should use
index.searchAsync
by @chenjiahan in #1898
Full Changelog: v1.42.1...v1.43.0
v1.42.1
What's Changed
Performance 🚀
Bug Fixes 🐞
- fix(search): should search JSX element code block by @SoonIter in #1867
- fix(search): for #1867, search codeBlock: false should work by @SoonIter in #1868
- fix: shim
_dirname
in esm output by @9aoy in #1874 - fix: support custom anchor id in title by @JounQin in #1876
- fix(globalUIComponents): fix package.json files #1878 by @SoonIter in #1883
Other Changes
- test(infra): use path-serializer by @SoonIter in #1869
- refactor: remove all unnecessary any types, extend PageIndexInfo interface by @JounQin in #1877
- refactor(tsconfig): migrate tsconfig to @rspress/config/tsconfig by @SoonIter in #1879
- refactor(infra/tsconfig): turn on "noUnusedLocals" by @SoonIter in #1880
- chore(deps): bump Rslib v0.5.2 and modify some build configurations by @Timeless0911 in #1881
- refactor(types): turn on
"strict": true
for @rspress/core by @SoonIter in #1882 - Release v1.42.1 by @SoonIter in #1885
Full Changelog: v1.42.0...v1.42.1