Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Do we support dynamic routing? #1368

Open
bosens-China opened this issue Aug 30, 2024 · 7 comments
Open

[Feature]: Do we support dynamic routing? #1368

bosens-China opened this issue Aug 30, 2024 · 7 comments

Comments

@bosens-China
Copy link

这个功能解决了什么问题?

有一些很重复的场景,可能只是内容不同,其他都是相同的,如果能暴露一个动态路由,可以通过编程式的来处理所有数据这就太完美了。

你期望的 API 是什么样子的?

在docs文件下创建类似于 :id的文件夹表示这个是一个动态组件,在文件夹内创建 index.tsx等文件,接收一个props包含id,这样就可以批量处理了。

@Timeless0911
Copy link
Collaborator

Rspress just like many similar frameworks, is a static site generator that uses file-based convention routing. You can try using Modern.js or other frameworks to build your own document site to meet these dynamic requirements.

@Timeless0911
Copy link
Collaborator

Timeless0911 commented Aug 30, 2024

This feature can be implemented into Rspress, but we don't have plans to do now. If you are interested, you can contribute a PR. FYI: https://vitepress.dev/guide/routing#dynamic-routes

@bosens-China
Copy link
Author

@Timeless0911 如果我在其他框架,例如next能直接使用你们的ui吗?就是默认的主题,跟我现在在rspress看到的一致

@Timeless0911
Copy link
Collaborator

这当然不能了

@bosens-China
Copy link
Author

这当然不能了

😃没办法支持吗

@Timeless0911
Copy link
Collaborator

Not our goal and if you are interest, you can contribute a PR.

@bosens-China
Copy link
Author

老哥业务太多了,实在没办法贡献呀😄

@Timeless0911 Timeless0911 changed the title [Feature]: 支持动态路由吗 [Feature]: Do we support dynamic routing? Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants