Skip to content

[Feature][RuntimeComponent]: Support <Files /> #2154

@SoonIter

Description

@SoonIter

What problem does this feature solve?

Image

In order to better print file tree information

```sh
docs
├── en
│   ├── _meta.json // navigation bar level
│   └── guides
│       ├── _meta.json // sidebar level
│       ├── introduction.mdx
│       ├── install.mdx
│       └── advanced
│           ├── _meta.json // sidebar level
│           └── plugin-development.md
└── zh
    ├── _meta.json // navigation bar level
    └── guides
        ├── _meta.json // sidebar level
        ├── introduction.mdx
        ├── install.mdx
        └── advanced
            ├── _meta.json // sidebar level
            └── plugin-development.md
```

"shell script" code block is not for printing file tree, but it is used commonly in prism

This will cause this part of the code is very ugly when users switch to shiki, the best solution to this issue is to provide a component to meet this part of needs

What does the proposed API look like?

https://fumadocs.dev/docs/ui/components/files

import { File, Folder, Files } from 'rspress/theme';
import { File, Folder, Files } from '@rspress/theme-default';

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions