跳到主要内容

Docusaurus 2021 回顾

· 阅读需 8 分钟
陈思达
努力开发 Docusaurus 中

Docusaurus 在 2021 一年中进展神速! We've seen a lot of traction and just crossed 30k stars on GitHub!

We've reached full feature parity with v1 after the release of internationalization, announced our first beta, and welcomed significantly more users this year.

The official v2 release is just around the corner! Follow the roadmap issue for any latest news.

精彩内容

我们首先回顾一下今年的几个亮点时刻。 Remember the todo-list from half a year ago? 是时候再把它拿出来了,看看我们走了多远!

  • Internationalization: officially released four months after its initial landing in late 2020. Seen great success in many projects
  • Autogenerated sidebars: no need to maintain a big sidebars.js anymore
  • Webpack 5: significantly improved build performance
  • Trailing slash config: seamless integration with any content hosting provider
  • Redesigned mobile navigation: mobile users now enjoy all navigation features as on desktop
  • UI improvements: more accessible quotes, better admonitions, back-to-top button...
  • Blog multi-authors: credit all the amazing contributors that collaborated on one blog post!
  • More blog features: archive page, structured data for SEO, full post content in feeds – empowering you to ship a fully-featured blog in no time
  • Asset collocation: no need for a bloated static folder anymore: colocate your images with Markdown files
  • Sidebar category index pages: category labels can now be associated with pages, enabling better doc organization

我们的代码库也在今年被逐渐打磨完善。 我们提高了测试覆盖率,把所有包都迁移到了 TypeScript,并把我们发布的包的大小减少了最多 60%!

趋势

npm

Docusaurus v2 继续稳步增长。 V2 的安装量已经达到了 v1 的 8 倍。 就每周下载量而言,增长又翻了三番(+209.4%),从 1 月初的 28,066 次增加到了 12 月中旬的 86,846 次。

Docusaurus v1 vs. v2 npm trends of the year 2021. The installations of Docusaurus v2 is constantly rising, while v1 is almost constant. V1 stays at 10000, while v2 grows from 30000 to almost 90000. There's a sharp drop from 90000 to 40000 just before the Jan 2022 line.

(啊,这经典的圣诞节骤降啊……)

We released 18 versions, going from 2.0.0-alpha.71 to 2.0.0-beta.14. 那就是每 20 天发布一个版本!

GitHub

  • Stars: 20,460 → 29,679 (+45.1% y/y). 并且,就在这篇文章发布之前,我们刚刚达到了 3 万星!
  • Total contributors: 512 → 773 (+51.0% y/y)
  • Dependents: 5,039 → 14,579 (+189.3% y/y) for v2, and 6,311 → 7,581 (+20.1% y/y) for v1
  • Commits: 1,187 commits in the past year, averaging 23 commits every week
  • Issues: 619 issues opened, 505 of them eventually resolved
  • A new core team member (yep, that's me 😝)

我们的星星趋势也很乐观。 Compared to similar projects, we are growing at a faster rate:

Stars trend by year of 9 static site generators. Next.js grows the fastest, with Docusaurus at the 4th place in terms of growth rate.

With an 8.4k increase in stars, we are ranked number 3 in this year's JavaScript rising stars of static site generators, preceded only by Next.js and Astro.

Docusaurus placing 3rd in the "Static Sites" ranking list

亮眼用户

Our showcase has welcomed a few new "favorite" sites that showcase the true potential of Docusaurus 2's pluggable architecture.

Iota wiki light modeIota wiki dark mode

Dyte light modeDyte dark mode

Ionic light modeIonic dark mode

Courier

Docusaurus 用户的创造力远超我们所想 🤩 我们期待着越来越多的使用者在利用 Docusaurus 的内容功能时,积极探索独创的主题设计! If your site uses Docusaurus, we would love to have it in our showcase.

社区

As an active moderator on Discord, I can clearly see the community thriving. 许多常见问题现在已经被纳入了文档,一些功能建议也已被实现。 项目和社区之间始终保持互惠互利的关系——我自己在成为维护者之前,就曾是社区贡献者。

We are constantly mentioned on X with inspirational feedback:

@docusaurus is amazing! 难以想象它用起来这么简单。

没有额外的插件、工具或者编译步骤。 它安装完就能工作了。

I love @docusaurus. 没有 Docusaurus,我完全没法如此高效而漂亮地搭建我网站上的 API、教程和博客。

And we keep every one of them in our little box 😄 If you enjoy Docusaurus yourself, keep tagging us with your comments!

As we approach the official release, we are interested in knowing more about what people are doing out there: plugin authors, creators of customized sites, and all new users – please keep us posted about your achievements so we can steer our development to better serve your needs.

前瞻

在过去几个月里,我们一直不断提及 Docusaurus 的发布候选阶段——是的,马上就到了。 We have created a dedicated milestone to keep track of all issues to solve before we can confidently progress to the next stage. In short, we want to build a more robust theming workflow, empowering creative site creators to customize our default theme without fearing breaking changes as they upgrade. 这将包括:

  • Guidelines on component organization. 我们希望主题组件具有适当的粒度,最好是当你想要自定义你的网站的某部分时,总是能找到一个正好负责那个部分的组件。
  • Improvements to the swizzle CLI. 我们希望用户能快乐地使用它,让它引导你完成所有的 swizzle 场景。
  • Refactoring our theme APIs. 我们希望所有可以被 swizzle 的组件都真的适合被 swizzle,所以我们会移走所有非 UI 的组件。
  • Docs. 我们希望我们的文档对所有用户都同样可读——无论是初次接触编程还是有经验的 web 开发者。 我们会把它组织成一个渐进式的教程,使得各种技术水平的读者都可以从中受益。

Read more about plans for Docusaurus 2.0 in this roadmap issue. 有了社区的帮助,2.0 版本才能变得更好,所以请在任何里程碑 issue 下面畅所欲言,分享你的意见与建议!

因为核心团队正忙于完成正式版本发布,所以我们会在 2.0 之后的小版本中发布其他有用的功能。 We have even made further plans for architectural changes in 3.0!

Docusaurus 2.0 正式版发布之后,我们有信心看到更多的用户加入,以及从 v1 迁移而来。

We'd like to express our gratitude to all the contributors in 2021, including:

  • The core team: Alexey Pyltsyn, Sébastien Lorber, Joshua Chen, and Yangshun Tay for moderating the community, publicizing Docusaurus, triaging issues, and implementing new features
  • Joel Marcey for creating Docusaurus and supporting its development all along
  • The Algolia team for helping Docusaurus users migrate to the new DocSearch and answering search-related questions
  • 所有活跃的社区成员,感谢他们所做的代码贡献、文档改进,以及在 Discord 上回答问题

别了,2021,让我们向光明的 2022 年问好吧!