-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Migrate Jest website to Docusaurus v2 #11021
Migrate Jest website to Docusaurus v2 #11021
Conversation
@RDIL @SimenB we don't force anyone to create versioned docs, if you feel versioning only major versions is simpler to manage, then just do that 👍 See for example react-navigation: https://reactnavigation.org/ Is Jest 26.6 significantly different from Jest 26.5 and it needs a docs version? I can't answer that question for you :) |
There are APIs in .6 that doesn't exist in .5. With docusaurus v1, that means a single file (https://github.com/facebook/jest/tree/ca479ff2ac03bb9a47d5000bfe8c3b747d850c30/website/versioned_docs/version-26.6) as the only diff is a new config option. The "need a doc version" is not really a problem as it's a single file and an update to a json file (both of which is done automatically via Docusaurus v2 approach makes that less feasible though as we need to check in every file. I guess we can start adding "Added in 26.6" here and there in the docs rather then rolling new doc versions. We did that before introducing versioning. That said, I'd prefer this PR to land with consolidated |
That's actually a really good idea for a plugin, single file versioned docs. |
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## jest-website-v2 #11021 +/- ##
===================================================
- Coverage 64.23% 64.22% -0.02%
===================================================
Files 305 305
Lines 13255 13254 -1
Branches 3235 3234 -1
===================================================
- Hits 8515 8512 -3
- Misses 4049 4050 +1
- Partials 691 692 +1
Continue to review full report at Codecov.
|
65c6a8f
to
fd34cd0
Compare
…us-2 # Conflicts: # yarn.lock
As we agreed on, I created the consolidated 26.x version |
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.
website/README.md
is failing lint, beyond that I think we're good to go with landing this 👍
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Migrate Jest to Docusaurus v2, including i18n support
More infos about this migration here:
jest-website-migration#2
Urls and Redirects
Older URLs should work fine for the default en and alternate ja locales:
https://jestjs.netlify.app/en/
https://jestjs.netlify.app/ja/
https://jestjs.netlify.app/en/help
https://jestjs.netlify.app/ja/help
https://jestjs.netlify.app/docs/en/getting-started
https://jestjs.netlify.app/docs/ja/getting-started
https://jestjs.netlify.app/docs/en/api
https://jestjs.netlify.app/docs/ja/api
https://jestjs.netlify.app/blog
https://jestjs.netlify.app/blog/2020/05/05/jest-26
Note:
.html
extension is redirected to non-html extension tooi18n
The i18n translations should be done on a new Crowdin project: https://crowdin.com/project/jest-v2
Older Crowdin project can be archived/ignored: https://crowdin.com/project/jest
Note: unlike v1, the blog posts can now be translated
PWA
Installed PWA support for those who want a Jest app:
Test plan
Deploy preview: https://jestjs.netlify.app/
The preview is triggered from the fork as I need to access a sensitive Crowdin environment variable to deploy the translated sites, and as an external Jest contributor that env variable would be stripped by CI.