docusaurus/website/blog/2021-01-19-docusaurus-2020-recap.md
Joshua Chen 493225a3c6
feat(plugin-blog): multi-authors support + authors.yml global configuration (#5396)
* Complete function

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* A lot of blank lines

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* More lenient validation

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Remove or

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Simpler logic

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Expand docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Better docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Dogfood

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* More writeup

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Polish

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Polish

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Move mergeAuthorMap to authors.ts

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Unbreak relative assets

* Update docs

* Clarify in docs

* simplify feed authors

* rename authorMap -> authorsMap

* mergeAuthorsMap -> getBlogPostAuthors

* website => 5 blog posts per page

* improve authors map file

* Extract new theme authors components + display in row

* add comment for meta array syntaxes

* blog => getPathsToWatch should watch authorsMap file

* remove useless v1 blog FBID frontmatter

* keep older frontmatter syntax for now

* revert blog frontmatter

* Better console message

* better blog authors frontmatter impl

* add multi authors to beta blog post + fix some authors margins

* fix React key

* Refactor: mdx loader should support a more flexible assets system (poc, not documented yet)

* better display of blog post authors: adapt layout to authors count + add line clamp

* smaller local image

* fix blog feed tests

* fix blog frontmatter tests + improve validation schema

* add more frontmatter tests

* add tests for getAuthorsMapFilePath

* tests for validateAuthorsMapFile

* add tests for readAuthorsMapFile

* test getAuthorsMap

* exhaustive tests for getBlogPostAuthors

* fix remaining tests

* missing blog plugin author tests

* fix windows tests

* improve blog multi-author's doc

* Use new format in init template

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Improve error message

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* update feed snapshot

* blog authors: limit to 2 cols + fix margins for no authors

* minor doc improvements

* better init template blog posts, demonstrating Blog features

* replace the legacy blog author frontmatter in remaining places

* Prefer using clsx

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* cleanup getColClassName

* remove blog author name/title line-clamping

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-26 12:21:58 +02:00

8.3 KiB

title authors tags image
Docusaurus 2020 Recap
slorber
recap
/img/docusaurus-2020-recap.png

2020 was great for Docusaurus, despite a regrettable start and a tumultuous year for everyone.

We continued to invest in Docusaurus 2, and made it reach full feature parity with Docusaurus 1.

We now recommend Docusaurus 2 as the default choice to start a new Docusaurus project and encourage v1 users to migrate to Docusaurus 2.

We are still in alpha, but expect some good news very soon!

Docusaurus v1 vs v2 npm trends

Docusaurus 2 highlights

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! (preview, doc)
  • 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 v1 vs v2 npm trends

Notable projects, startups, large companies, and individuals adopted Docusaurus 2 (showcase):

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):

React Native screenshot

Localized Docusaurus 1 sites (like Jest) will be able to upgrade too:

Jest in Japanese screenshot

We also saw the first right-to-left Docusaurus 2 site published:

Datagit screenshot

GitHub Activity

  • Stars: 14632 -> 20946 (+43.2% y/y)
  • Total Contributors: 303 -> 512 (+68.9% y/y). Most of which are non-Facebook contributors
  • 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.

Media

Dmitry Vinnik (Developer Advocate @ Facebook) explains Docusaurus in 60 seconds or 15min videos.

Rachel Nabors (Documentation Engineer @ Facebook) talked a bit about Docusaurus in React Native Radio 178 (podcast), and William Candillon the React Native website migration (video).

Many blog posts have been published:

Community

The Docusaurus community continues to grow, the Discord server is quite active, and Stack Overflow questions keep being posted.

The modular architecture of Docusaurus 2 allowed the community to build and publish third-party plugins. As we would like to federate better our community, if you are building a plugin, please let us know.

What's next?

As the core features of Docusaurus 2 have finally been built, we will be able to dedicate more time to solve the pain points and bugs reported by the community, and make Docusaurus stable and convenient enough to enter the beta and release-candidate phase.

With proper support for i18n and versioning, and large scale migrations such as React Native and Jest, we now have a clear migration path for all Docusaurus 1 sites.

We still have a few major features that we would like to work on:

Huge thanks to the community for their contributions in 2020, especially:

  • Joel Marcey for creating Docusaurus and supporting the project all this time
  • the core team - Alexey Pyltsyn, Sébastien Lorber, Yangshun Tay
  • the Major League Hacking and Facebook interns for their significant impact
  • the Algolia team for DocSearch 3 and their support
  • Bartosz Kaszubowski for his investment in the React Native migration
  • the whole community for their contributions, and providing support to each other

Cheers to a great 2021! 🎉