-
Notifications
You must be signed in to change notification settings - Fork 0
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
What content we should show in root component page? #14
Comments
The thing i see about this is that. Sidebar as two types: Groups and multiples. In groups it's one sidebar everywhere that ou can disable in some pages. guide/ In this case If you dont create a components folder inside docs/ that as a readme.md the root. He will create a page when you come into components that tell the structure components/ If you create the readme it will take it. Check my branch in codesandbox i added it i think So i think answear your question. It depend First we should check if in multiple sidebar it does the same as group. And if yes we should generate if not i dont know |
We maybe improve first the what structure we create. Because for now it juse create a structure like this components/ Maybe we should consider about it? |
Should we support
|
About structure, I think we will refactor code to support hierarchy instead of all component shown in the root. |
Link and sidebar will base on folder structure.
|
1rst point. I am not sure it is necessary even if vue-styleguidisit support it. I think it's better to choose one or another no ? 2nd point. Yeah i agree but it will depend on what we can do with sidebar. For hierarchy. We can just do that with the multiple sidebar no? We cannot do it with groups sidebar because we can't do children of children but maybe i am wrong. And in the multiple sidebar we can have 1 depth hierarchy. We need to think more about it. 3rd Yeah with that structure in multiple it can work i think. Maybe it can be good to let the user choose an option? In group it's automatically in the root ? And for multiple we can let them choose root or split? |
I am actually commenting all the code for a better understanding of all for me |
I am inspiring about this. https://github.com/vuejs/vuepress/blob/master/packages/docs/docs/.vuepress/config.js It actually using groups + children. With this we can create what you wanted like
We can focus on that and the other case in multiple sidebar
We can throw an error for this and explain why we do not do that ? or add all components we found in the root structure |
I really like your idea |
I think it's not hard to implement just change the directory structure. You want to work on it ? I can but first i need to finish my pr and I need you to validate it and answear to my question about codesandbox |
Okie I will fix it :D |
Tell me if you work on it or if you want i work on it :) |
I will work on it, you need to concentrate on Codesandbox 👍 |
i finished it for the first version. Maybe we can add global require that needed to be injected into it |
How we show sidebar if the component in sub-directory has a level > 1.
|
Hum The user should avoid this I think. we should limit at level 0 and 1. Or maybe you can add the sub level in the name like text/Heading But it is not possible to do this with the actual sidebar from vuepress. One thing could be to show multiple preview component in one readme but it will be hard. For the first version maybe we should focus on one thing. If level > 1 add a root children to the level1 that i can access when i render the component with codesanbox to add it to the context of the app Or more simple do nothing and the user will have to add it manually in some global require |
I am actually working in Leroy merlin a big french company i will use this plugin to test it with global require when u have finish |
Okie, I think we need this rule. |
Did you create a branch ? Any updates :) ? |
In build page script, I write a draft to show a list component for the root component page (
/${prefix}
. Default is/components
).vuepress-plugin-component-docgen/src/build/pages/pages.ts
Lines 46 to 47 in 621f877
Should we generate the content this page or allow user customize (same basic example, you write
components/readme.md
?The text was updated successfully, but these errors were encountered: