-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Docs sidebar should be configuration less #1178
Comments
This approach involves quite a big of magic (reminds me of Rails) which makes Docusaurus usage less obvious and becomes harder to understand. I think being explicit is better. Another issue with this approach is the ordering of the files within a category. How would you define the ordering if you don't have the |
I agree that being explicit is better as it makes even program logic more obvious ( because of that I don't prefer Regex in some cases. it will give transparent flexibility over unmatured constraints ) and I think this case will not make unobvious as To summarise Both cannot co-exist.
If the user wants more flexibility he should invest in explicit configuration. But if the user wants just his docs to be shown on his site and alphabetical ordering is making more sense for that user then he no need to do any configuration. one more thing is documentation tool is not the only tool a user uses. so they have to deal with so many things and many configs. and they no need to make everything in their app 100% perfect in first place. In most times they need an MVP. and more flexibility comes with more config. |
Remind me of webpack. Too much configuration. I think this is quite a good idea, but definitely not a high priority for now (we should focus on v2 :( ) If anyone want to implement this, we’ll be happy |
🚀 Feature
In a simple case, docs sidebar should to derived without the sidebars.json configuration file. by following a convention on directory structure and file naming.
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Motivation
Reduce the configuration required. Allow users to add a documentation page without touching multiple files.
Pitch
if docs property is not present in sidebars.json then assume each directory inside a docs folder is a category and each folder contain files in PascalCase so
pascal-case
will be URL slug. andPascal Case
will be a title.The text was updated successfully, but these errors were encountered: