Skip to content

2021

过去、现在和未来

¥The past, present and future

2021 年对于这个项目来说是辉煌的一年,因为我们推出了许多出色的新功能,用户数量显著增长,并利用 GitHub 赞助商使项目可持续发展。

¥2021 was a fantastic year for this project as we shipped many new awesome features, saw significant user growth and leveraged GitHub Sponsors to make the project sustainable.

如今,在为您的技术文档项目选择静态站点生成器和主题时, MkDocs和 Material for MkDocs 是最受欢迎的选择之一。Material for MkDocs 确保您的内容始终完美呈现给受众,无论屏幕分辨率或设备功能如何。它已经发展成为一个技术写作框架,提供许多功能,其中一些功能在其他静态站点生成器中尚不可用。然而,这远未结束,因为 2022 年将带来一些有趣的新功能。

¥Today, together, MkDocs and Material for MkDocs are among the most popular options when it comes to choosing a static site generator and theme for your technical documentation project. Material for MkDocs ensures that your content is always perfectly presented to your audience, regardless of screen resolution or device capabilities. It has evolved to a framework for technical writing, offering many features, some of which are yet to be found in other static site generators. However, we're far from the end, as 2022 is going to bring some interesting new capabilities.

¥Excluding content from search

最新的 Insiders 版本带来了三种新的简单方法,可以从搜索索引中排除文档的专用部分,从而实现更细粒度的控制。

¥The latest Insiders release brings three new simple ways to exclude dedicated parts of a document from the search index, allowing for more fine-grained control.

两周前,Material for MkDocs Insiders 发布了一款全新的搜索插件,不仅大幅提升了易用性,还优化了搜索索引的速度和大小。有趣的是,正如上一篇博客文章中所讨论的,我们只是触及了现有功能的冰山一角。此版本带来了一些实用功能,提升了写作体验,允许更精细地控制 Markdown 文件中哪些页面、章节和区块应该被内置搜索功能索引。

¥Two weeks ago, Material for MkDocs Insiders shipped a brand new search plugin, yielding massive improvements in usability, but also in speed and size of the search index. Interestingly, as discussed in the previous blog article, we only scratched the surface of what's now possible. This release brings some useful features that enhance the writing experience, allowing for more fine-grained control of what pages, sections and blocks of a Markdown file should be indexed by the built-in search functionality.

搜索:更好、更快、更小

¥Search: better, faster, smaller

这是我们如何彻底重建客户端搜索的故事,在提供更好的用户体验的同时,使其变得更快、更小。

¥This is the story of how we managed to completely rebuild client-side search, delivering a significantly better user experience while making it faster and smaller at the same time.

Material for MkDocs 的搜索功能是迄今为止其最优秀、最受欢迎的资产之一:多语言离线功能,以及最重要的:全客户端。它提供了一种解决方案,使您的文档用户能够立即找到他们正在搜索的内容,而无需管理额外的服务器。然而,即使已经进行了多次迭代,仍有一些改进空间,因此我们从头开始重建了搜索插件和集成。本文将揭示新搜索的内部原理、它为何比以前的版本更强大,以及即将推出的功能。

¥The search of Material for MkDocs is by far one of its best and most-loved assets: multilingual, offline-capable, and most importantly: all client-side. It provides a solution to empower the users of your documentation to find what they're searching for instantly without the headache of managing additional servers. However, even though several iterations have been made, there's still some room for improvement, which is why we rebuilt the search plugin and integration from the ground up. This article shines some light on the internals of the new search, why it's much more powerful than the previous version, and what's about to come.