Skip to content

docs: add rspress-plugin-file-tree and use tree syntax for file tree code blocks#2976

Merged
SoonIter merged 7 commits intomainfrom
syt_vk/ba0e-rspress-plugin-f
Jan 8, 2026
Merged

docs: add rspress-plugin-file-tree and use tree syntax for file tree code blocks#2976
SoonIter merged 7 commits intomainfrom
syt_vk/ba0e-rspress-plugin-f

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Jan 7, 2026

Summary

Add rspress-plugin-file-tree plugin to the website and update all file tree code blocks to use the tree language syntax for enhanced visual rendering.

before

image

after

image

Related Issue

N/A

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

AI Summary

Changes Made

  1. Added rspress-plugin-file-tree plugin

    • Added dependency in website/package.json
    • Configured plugin in website/rspress.config.ts
  2. Updated file tree code blocks (22 files, 40+ code blocks)

    • Changed ```txt to ```tree for all file tree structures
    • Preserved non-file-tree ```txt blocks (command output, markdown examples)

Files Modified

Configuration:

  • website/package.json - Added rspress-plugin-file-tree dependency
  • website/rspress.config.ts - Imported and configured pluginFileTree()

English Documentation (11 files):

  • docs/en/guide/start/introduction.mdx
  • docs/en/guide/basic/ssg.mdx, ssg-md.mdx, auto-nav-sidebar.mdx
  • docs/en/guide/basic/i18n.mdx, multi-version.mdx, conventional-route.mdx
  • docs/en/guide/basic/custom-theme.mdx, static-assets.mdx
  • docs/en/guide/advanced/overview-page.mdx
  • docs/en/plugin/official-plugins/typedoc.mdx

Chinese Documentation (11 files):

  • Corresponding Chinese versions of all the above files

Why These Changes

The rspress-plugin-file-tree plugin provides enhanced visual rendering for file tree structures in documentation. By using the tree syntax instead of plain txt, file trees will be rendered with proper styling, making the documentation more readable and visually appealing.


This PR was written using Vibe Kanban


## 完成总结

已完成以下修改:

### 1. 安装配置 `rspress-plugin-file-tree` 插件

- **package.json**: 添加了 `rspress-plugin-file-tree` 依赖
- **rspress.config.ts**:
  - 导入 `import pluginFileTree from 'rspress-plugin-file-tree';`
  - 在 plugins 数组中添加 `pluginFileTree()`

### 2. 将所有文件树代码块从 `txt` 改为 `tree`

修改了以下 22 个文件中的文件树代码块:

**英文文档 (11 个文件)**:
- `docs/en/guide/start/introduction.mdx`
- `docs/en/guide/basic/ssg.mdx`
- `docs/en/guide/basic/ssg-md.mdx` (2 处)
- `docs/en/guide/basic/auto-nav-sidebar.mdx` (5 处)
- `docs/en/guide/basic/i18n.mdx` (2 处)
- `docs/en/guide/basic/multi-version.mdx`
- `docs/en/guide/basic/conventional-route.mdx` (2 处)
- `docs/en/guide/basic/custom-theme.mdx` (3 处)
- `docs/en/guide/basic/static-assets.mdx`
- `docs/en/guide/advanced/overview-page.mdx` (3 处)
- `docs/en/plugin/official-plugins/typedoc.mdx`

**中文文档 (11 个文件)**:
- `docs/zh/guide/start/introduction.mdx`
- `docs/zh/guide/basic/ssg.mdx`
- `docs/zh/guide/basic/ssg-md.mdx` (2 处)
- `docs/zh/guide/basic/auto-nav-sidebar.mdx` (5 处)
- `docs/zh/guide/basic/i18n.mdx` (2 处)
- `docs/zh/guide/basic/multi-version.mdx`
- `docs/zh/guide/basic/conventional-route.mdx` (2 处)
- `docs/zh/guide/basic/custom-theme.mdx` (2 处)
- `docs/zh/guide/basic/static-assets.mdx`
- `docs/zh/guide/advanced/overview-page.mdx` (3 处)
- `docs/zh/plugin/official-plugins/typedoc.mdx`

注意:`commands.mdx` 和部分 `ssg-md.mdx` 中的 `txt` 代码块保持不变,因为它们不是文件树结构(是命令行帮助输出和 markdown 内容示例)。
Copilot AI review requested due to automatic review settings January 7, 2026 17:01
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 7, 2026

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit d4bf393
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/695eaa66d3ef9b00083519c8
😎 Deploy Preview https://deploy-preview-2976--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title 文档中增加 rspress-plugin-file-tree (vibe-kanban) feat(website): add rspress-plugin-file-tree and use tree syntax for file tree code blocks Jan 7, 2026
@SoonIter SoonIter changed the title feat(website): add rspress-plugin-file-tree and use tree syntax for file tree code blocks docs: add rspress-plugin-file-tree and use tree syntax for file tree code blocks Jan 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 3 projects with changes.

📊 Quick Summary
Project Total Size Change
node 9.6 MB +79.8 KB (0.8%)
node_md 1.2 MB +10.0 B (0.0%)
web 15.5 MB 📈 +200.3 KB (+1.3%)
📋 Detailed Reports (Click to expand)

📁 node

Path: website/doc_build/diff-rsdoctor/node/rsdoctor-data.json

📌 Baseline Commit: 8ee0cff247 | PR: #2975

Metric Current Baseline Change
📊 Total Size 9.6 MB 9.5 MB +79.8 KB (0.8%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 9.6 MB 9.5 MB +79.8 KB (0.8%)
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: node Bundle Diff

📁 node_md

Path: website/doc_build/diff-rsdoctor/node_md/rsdoctor-data.json

📌 Baseline Commit: 8ee0cff247 | PR: #2975

Metric Current Baseline Change
📊 Total Size 1.2 MB 1.2 MB +10.0 B (0.0%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 1.2 MB 1.2 MB +10.0 B (0.0%)

📦 Download Diff Report: node_md Bundle Diff

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: 8ee0cff247 | PR: #2975

Metric Current Baseline Change
📊 Total Size 15.5 MB 15.3 MB +200.3 KB (+1.3%)
📄 JavaScript 14.8 MB 14.6 MB +199.0 KB (+1.3%)
🎨 CSS 130.0 KB 128.7 KB +1.3 KB (+1.0%)
🌐 HTML 0 B 0 B 0
📁 Other Assets 556.0 KB 556.0 KB -38.0 B (-0.0%)

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the rspress-plugin-file-tree plugin to enable better visualization of directory structures in documentation, and systematically converts all directory structure code blocks from txt to tree language syntax across both Chinese and English documentation.

  • Added rspress-plugin-file-tree@^1.0.1 dependency and configured it in the rspress configuration
  • Updated 27 documentation files to use tree language syntax for directory structure code blocks
  • Ensures consistent rendering of file tree structures across the entire documentation site

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/rspress.config.ts Imports and configures the file tree plugin
website/package.json Adds rspress-plugin-file-tree dependency
website/docs/zh/plugin/official-plugins/typedoc.mdx Converts directory structure from txt to tree syntax
website/docs/zh/guide/start/introduction.mdx Converts directory structure from txt to tree syntax
website/docs/zh/guide/basic/static-assets.mdx Converts directory structure from txt to tree syntax
website/docs/zh/guide/basic/ssg.mdx Converts build output structure from txt to tree syntax
website/docs/zh/guide/basic/ssg-md.mdx Converts build output structures from txt to tree syntax
website/docs/zh/guide/basic/multi-version.mdx Converts directory structure from txt to tree syntax
website/docs/zh/guide/basic/i18n.mdx Converts directory structures from txt to tree syntax
website/docs/zh/guide/basic/custom-theme.mdx Converts theme directory structures from txt to tree syntax
website/docs/zh/guide/basic/conventional-route.mdx Converts directory structures from txt to tree syntax
website/docs/zh/guide/basic/auto-nav-sidebar.mdx Converts directory structures from txt to tree syntax
website/docs/zh/guide/advanced/overview-page.mdx Converts directory structures from txt to tree syntax
website/docs/en/plugin/official-plugins/typedoc.mdx Converts directory structure from txt to tree syntax
website/docs/en/guide/start/introduction.mdx Converts directory structure from txt to tree syntax
website/docs/en/guide/basic/static-assets.mdx Converts directory structure from txt to tree syntax
website/docs/en/guide/basic/ssg.mdx Converts build output structure from txt to tree syntax
website/docs/en/guide/basic/ssg-md.mdx Converts build output structures from txt to tree syntax
website/docs/en/guide/basic/multi-version.mdx Converts directory structure from txt to tree syntax
website/docs/en/guide/basic/i18n.mdx Converts directory structures from txt to tree syntax
website/docs/en/guide/basic/custom-theme.mdx Converts theme directory structures from txt to tree syntax
website/docs/en/guide/basic/conventional-route.mdx Converts directory structures from txt to tree syntax
website/docs/en/guide/basic/auto-nav-sidebar.mdx Converts directory structures from txt to tree syntax
website/docs/en/guide/advanced/overview-page.mdx Converts directory structures from txt to tree syntax
pnpm-lock.yaml Updates lockfile with new dependencies and their transitive dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

1. 识别 `<-- "..."` 形式的注释(不仅仅是 `//` 和 `#`)
2. 如果开头第一行是 `.`,则跳过第一行

但是这个插件的源码位于另一个 worktree(`/var/folders/wt/r13w69wd7v9bh3b_t_p24sjm0000gn/T/vibe-kanban/worktrees/40d3-rspress-plugin-f/rspress-plugins/packages/rspress-plugin-file-tree`),不在当前的 rspress 仓库中。

你需要我在当前会话中修改那个插件的源码吗?还是这个任务应该在另一个 worktree/会话中处理?
@SoonIter SoonIter requested a review from Timeless0911 January 8, 2026 06:53
@SoonIter SoonIter merged commit 325b1ca into main Jan 8, 2026
10 checks passed
@SoonIter SoonIter deleted the syt_vk/ba0e-rspress-plugin-f branch January 8, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants