-
-
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
feat(v2): allow home page for docs #2652
Conversation
92d16c7
to
87be59e
Compare
Deploy preview for docusaurus-2 ready! Built with commit 92d16c7 |
It's all right. |
Again, there seems to be a problem with snapshots being different in local (dev) and test (CI) environments. I take it this is due to the asynchronous processing of routes, perhaps it is worth sorting routes to achieve the same result? |
Even in my fork, tests with changes to this PR successfully pass. I can’t understand why in this (original) repo does not pass the tests.
|
Hell yeah, I added sorting for child routes and tests began to pass for CI. Now we have the same result on all environments. |
Thanks for this! Just FYI, this PR will need a rebase The other thing that will help us a lot with the homepage is #2537 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add this feature into the examples too?
Do you mean init template? |
Oh yes the templates. I think we should add useful defaults to the templates. |
Motivation
I am really excited to close all three of the listed PRs, finally this issue, which our users constantly mention, will be closed! 😝
Resolve #2507
Resolve #2567
Resolve #1973
Related issue on Canny - https://docusaurus.canny.io/admin/board/feature-requests/p/home-page-for-docs
Yes, indeed, although there are not many changes, the complexity of the code increases, but this is all because to cover all use cases:
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
See docs and preview (eg. https://deploy-preview-2652--docusaurus-2.netlify.app/docs/)
P.S. You can see in snapshots diff that the sorting of routes has been changed, that's actually how it should be (so you don't have to worry about that).
docusaurus/packages/docusaurus/src/server/plugins/index.ts
Lines 103 to 105 in 1f00d15
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)