2020 年对 Docusaurus 来说是伟大的一年,尽管开篇令人遗憾,并且对每个人来说都是动荡的一年。
我们不断对 Docusaurus 2 做出改良,其功能特性可与 Docusaurus 1 等量齐观。
我们现在推荐您在新 Docusaurus 项目中使用 Docusaurus 2,同时鼓励 v1 版本的用户进行更新。
我们仍然处于 alpha 阶段,但马上就要有好消息了!
Docusaurus 2 亮点
We have worked on many features this year, and would like to highlight the most significant ones:
- i18n: easily translate your Docusaurus site, released soon! (预览、文档)
- Version dropdown: enable contextual version switch
- Versioning options: solving the most common pain-points users had with versioning
- Contextual search: search in the current version, use the brand-new DocSearch 3 experience
- Markdown pages: use Markdown instead of React components to create standalone pages
- Better theme: various UI, UX and accessibility improvements
- PWA: add offline support to your site, and make it installable
- Fail-fast: strict config validation, detect broken links, and prevent bad production deployments
- Multi-instance: use the docs plugin twice on a single site (e.g. iOS/Android SDK docs)
- Migration CLI: automate the upgrade from Docusaurus 1
- CodeSandbox: assess Docusaurus easily from your browser with new.docusaurus.io
- Canary releases: use the
@canary
npm tag to use the upcoming release before anyone else - TypeScript: progressive adoption for internal code, and improve usage for users
- Publish Infima: it is now open-source
Docusaurus 2 growth
The plan to rebuild Docusaurus from scratch in 2019 paid off: after a slow start, Docusaurus 2 has been widely adopted and has already outgrown Docusaurus 1 usage.
知名项目、初创及大型企业和个人均采用了 Docusaurus 2(案例展示):
- Supabase
- React Navigation
- React Redux
- Vector
- Algolia DocSearch
- SAP Cloud SDK
- Palo Alto Cortex XSOAR
- Quddús George's website
We helped large scale Docusaurus 1 sites to upgrade, ensuring a proper migration path and feature parity.
React Native was successfully upgraded to Docusaurus 2 (archived v1 site):
Localized Docusaurus 1 sites (like Jest) will be able to upgrade too:
We also saw the first right-to-left Docusaurus 2 site published:
GitHub 数据
- Stars: 14632 → 20946 (+43.2% y/y)
- Total Contributors: 303 → 512 (+68.9% y/y). 啊
- Weekly npm Downloads: 2356 → 25592 (+986% y/y)
- On GitHub, Docusaurus 1 is used by 6311 projects (+62.9% y/y) while Docusaurus 2 is used by 5039 projects (+1940% y/y)
Collaboration with Major League Hacking
We have welcomed Major League Hacking (MLH) fellows for 2 seasons already.
We are very thankful for the various contributions they made, such as:
- Writing the foundations of the v1 to v2 migration CLI
- Help migrate the React Native website from v1 to v2
- Making the config validation more strict and exhaustive, returning helpful error messages
- Adding CodeSandbox support
- Improving the CI pipelines: build size and Lighthouse bots
We look forward to continuing this collaboration in 2021.