Skip to content

Releases: web-infra-dev/rspress

v2.0.0-beta.10

04 Jun 04:07
68ffc85
Compare
Choose a tag to compare
v2.0.0-beta.10 Pre-release
Pre-release

What's Changed

Bug Fixes 🐞

  • fix(infra): bundle size regression after migrating to bundleless dist by @SoonIter in #2228

Document πŸ“–

Other Changes

Full Changelog: v2.0.0-beta.9...v2.0.0-beta.10

v2.0.0-beta.9

30 May 03:39
9340e4b
Compare
Choose a tag to compare
v2.0.0-beta.9 Pre-release
Pre-release

What's Changed

New Features πŸŽ‰

Performance πŸš€

  • perf: remove useless rehype-codeMeta from prism highlighting by @SoonIter in #2214

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 πŸ“–

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

27 May 10:30
73f6c38
Compare
Choose a tag to compare
v2.0.0-beta.8 Pre-release
Pre-release

Highlights✨

Add <CodeBlockRuntime /> component for dynamic code block highlighting

related PR: #2190, #2206

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

Full Changelog: v2.0.0-beta.7...v2.0.0-beta.8

v2.0.0-beta.7

26 May 06:38
e0f4130
Compare
Choose a tag to compare
v2.0.0-beta.7 Pre-release
Pre-release

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 πŸ“–

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

16 May 13:08
d74db4f
Compare
Choose a tag to compare
v2.0.0-beta.6 Pre-release
Pre-release

What's Changed

New Features πŸŽ‰

Performance πŸš€

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 πŸ“–

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

13 May 12:35
ab36dc2
Compare
Choose a tag to compare

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

08 May 16:07
8c9afd1
Compare
Choose a tag to compare
v2.0.0-beta.5 Pre-release
Pre-release

Highlights✨

Use shiki v3 by default, drop prism support

related PR: #1672, #2046, #2122

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 in rspress/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 πŸ“–

  • docs(algolia-search): use new docsearch account and optimize the dark mode by @SoonIter in #2131

Other Changes

Full Changelog: v2.0.0-beta.4...v2.0.0-beta.5

v1.43.13

08 May 11:28
7c20101
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

  • feat: add localeRedirect: 'only-default-lang' support by @JounQin in #2129

Document πŸ“–

Other Changes

Full Changelog: v1.43.12...v1.43.13

v2.0.0-beta.4

07 May 11:44
a75ca43
Compare
Choose a tag to compare
v2.0.0-beta.4 Pre-release
Pre-release

Highlights✨

Enable dev.lazyCompilation: true by default

related PR: #2123

1. startup instantly

startup time 50x↑ faster with lazyCompilation: true

before 3.80s↓

image

after 0.05s↑

image

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

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

v2.0.0-beta.3

30 Apr 11:35
2e373eb
Compare
Choose a tag to compare
v2.0.0-beta.3 Pre-release
Pre-release

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 />

image

2. Support the <Badge /> in Title

e.g:

// foo.mdx
## Title <Badge>Required</Badge>

What's Changed

New Features πŸŽ‰

  • feat(theme/toc)!: use dynamic toc generation by @ktiays in #2018

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