Repository navigation
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 |
yangshun
left a comment
There was a problem hiding this comment.
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. |
* feat(v2): allow home page for docs * Refactor * Remove debugging info 🤦♂️ * Add sort routes for first test case * Sort child routes for consistency
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).
https://github.com/facebook/docusaurus/blob/1f00d15c7439fdbfb37d57f0cafdaedb2b34ef41/packages/docusaurus/src/server/plugins/index.ts#L103-L105
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.)