Skip to content

Releases: web-infra-dev/rspress

v1.43.5

14 Mar 09:51
3229281
Compare
Choose a tag to compare

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

12 Mar 10:01
8a5b65b
Compare
Choose a tag to compare
v2.0.0-alpha.2 Pre-release
Pre-release

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 🐞

Other Changes

New Contributors

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

v1.43.4

12 Mar 07:48
3af1eef
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: expose builder preview result for programming usage by @JounQin in #1945

Other Changes

Full Changelog: v1.43.3...v1.43.4

v1.43.3

11 Mar 17:14
bd98fbe
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

  • fix: rework sidebar menu responsive issues by @JounQin in #1935
  • fix(cli): should catch build errors by @JounQin in #1941
  • fix(mdxjs): not need to add base on normalizing links with base enabled by @JounQin in #1939

Other Changes

Full Changelog: v1.43.2...v1.43.3

v2.0.0-alpha.1

10 Mar 08:06
585561e
Compare
Choose a tag to compare
v2.0.0-alpha.1 Pre-release
Pre-release

What's Changed

Bug Fixes 🐞

Other Changes

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

v1.43.2

10 Mar 08:23
8dfc6c7
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

  • fix: Revert "fix: display outline correctly on >=960px <=1280px screen width (#1914)" by @SoonIter in #1930

Full Changelog: v1.43.1...v1.43.2

v2.0.0-alpha.0

07 Mar 07:46
c962a90
Compare
Choose a tag to compare
v2.0.0-alpha.0 Pre-release
Pre-release

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 than matchRoutes, remove unused group.title by @SoonIter in #1895
  • perf(search): improve initialization and prefetching logic by @chenjiahan in #1899

Bug Fixes 🐞

Document 📖

Other Changes

New Contributors

Full Changelog: v1.43.0...v2.0.0-alpha.0

v1.43.1

07 Mar 08:25
1e273ac
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

Other Changes

Full Changelog: v1.43.0...v1.43.1

v1.43.0

06 Mar 07:16
69c72af
Compare
Choose a tag to compare

What's Changed

New Features 🎉

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 than matchRoutes, remove unused group.title by @SoonIter in #1895
  • perf(search): improve initialization and prefetching logic by @chenjiahan in #1899

Bug Fixes 🐞

Full Changelog: v1.42.1...v1.43.0

v1.42.1

27 Feb 07:13
80542b8
Compare
Choose a tag to compare

What's Changed

Performance 🚀

  • perf(size): 🔥remove package.json useless field and bundle named package.json by @SoonIter in #1878

Bug Fixes 🐞

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