Highlights ✨
📦 Code Block Fold
related PR: #3241, #3251 | doc: [Code folding](https://rspress.rs/guide/use-mdx/code-blocks#code-folding)
You can now use ```tsx fold to make long code blocks collapsed by default, allowing readers to expand them on demand. The code block will be collapsed to a default height of 300px with an expand button at the bottom. You can also customize the collapsed height via the height attribute.
```tsx fold
// long code block content, collapsed by default
```
```tsx fold height="200"
// custom collapsed height (200px)
```🤖 rspress-custom-theme Skill for AI
Added the rspress-custom-theme skill to the AI guide page. This skill helps AI tools (like Claude Code) understand how to customize Rspress themes, making it easier to build custom theme components with AI assistance.
What's Changed
New Features 🎉
- feat(plugin-preview): resolve available port when default is occupied by @SoonIter in #3247
- feat(mdx): code block toggle
```tsx toggle(#2968) by @AmazingRain in #3241 - feat(auto-nav-sidebar): support download links in nav by @JounQin in #2926
- feat(plugin-rss): add final output
transformhook for atom/rss/json by @Copilot in #3238 - feat(plugin-preview): use customLogger with prefix for rsbuild instance by @SoonIter in #3256
Bug Fixes 🐞
- fix(theme): replace @theme imports with @rspress/core/theme to fix type resolve by @SoonIter in #3250
- fix(theme): disable
text-autospacein<code>,<kbd>, and<samp>by @tats-u in #3254
Document 📖
- docs: improve client-redirects plugin warning with fallback and limitation notes by @SoonIter in #3246
- docs: add back-to-blog button on blog subpages via custom theme by @SoonIter in #3248
- docs: add documentation for themeDir and i18nSourcePath config options by @SoonIter in #3249
- docs: add
rspress-custom-themeskill to AI guide page by @SoonIter in #3253
Other Changes
- chore(deps): update all patch dependencies by @renovate[bot] in #3242
- chore(deps): update shiki to ^4.0.2 by @renovate[bot] in #3244
- chore(deps): update dependency memfs to ^4.57.1 by @renovate[bot] in #3245
- chore(deps): update rstack by @renovate[bot] in #3243
- refactor(mdx): rename code block
toggleattribute tofoldand className--code-wrap->--wrap-codeby @SoonIter in #3251 - chore(deps): upgrade @rsbuild/core from 2.0.0-beta.9 to 2.0.0-beta.10 by @SoonIter in #3255
- Release v2.0.7 by @SoonIter in #3257
New Contributors
- @AmazingRain made their first contribution in #3241
Full Changelog: v2.0.6...v2.0.7