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

能否支持第二层级的其他文件名.md文件的识别,以支持 同一文件夹下有多个同类型组件导出的场景 #1850

Closed
x011223 opened this issue Aug 23, 2023 · 4 comments
Labels
question Further information is requested

Comments

@x011223
Copy link

x011223 commented Aug 23, 2023

Question

目前只能识别index.md / README.md,并且会识别为同一个路径。
image

如果有如下场景,一个点击文本跳转 一个点击图片跳转,此时 这边认为都是跳转类型组件,因此 在Link文件夹下(名为一个组件,但是实际上)导出 LinkText / LinkImage 两个组件,那么此时需要两个文档(index.md / link-image.md)且分组 来进行说明。

image

期望

image

@x011223 x011223 added the question Further information is requested label Aug 23, 2023
@PeachScript
Copy link
Member

没有这个计划,既然它们是独立的组件,应当作为第一类成员把它们放在 atomDirs 目录下,只要配置相同的 group 仍然是会归类到一起的

作为参考,antd 的 DataPicker 和 TimePicker 也是放在第一层级的:https://github.com/ant-design/ant-design/tree/master/components

@PeachScript PeachScript closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
@x011223
Copy link
Author

x011223 commented Aug 25, 2023

没有这个计划,既然它们是独立的组件,应当作为第一类成员把它们放在 atomDirs 目录下,只要配置相同的 group 仍然是会归类到一起的

作为参考,antd 的 DataPicker 和 TimePicker 也是放在第一层级的:https://github.com/ant-design/ant-design/tree/master/components

先不说组件如何划分。想知道为什么第二级只去识别index.md/README.md,是识别所有的md文档会增加渲染复杂度还是别的原因?按照我的理解这一个过滤似乎不会有什么明显的提升。

@PeachScript
Copy link
Member

和性能无关,这是 dumi 对原子资产目录结构的约定,组件与组件之间用文件夹分隔,以及组件源码、文档应当是一一对应的关系,这样组织会使得源码仓库更干净、统一

@x011223
Copy link
Author

x011223 commented Aug 25, 2023

和性能无关,这是 dumi 对原子资产目录结构的约定,组件与组件之间用文件夹分隔,以及组件源码、文档应当是一一对应的关系,这样组织会使得源码仓库更干净、统一

好的,感谢回复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants