Skip to content

2023

向您的项目添加徽章

¥Adding a badge to your project

您喜欢使用 Material for MkDocs 吗?分享您的爱!现在,您可以在项目的 README 文件中添加徽章,以表明您的项目是使用 Material for MkDocs 构建的。

¥You enjoy working with Material for MkDocs? Share the love! You can now add a badge to your project's README, showing that your project is built with Material for MkDocs.

MkDocs 徽标的素材刚刚添加到Simple Icons中, Shields.io使用它来将徽标包含在徽章中。我们为您生成了一个徽章,您可以将其添加到项目的 README 中:

¥Material for MkDocs' logo was just added to Simple Icons, which is used by Shields.io to include logos in badges. We generated a badge for you, which you can add to your project's README:

Gitter 的落幕:迈向高效的社区参与

¥Sunsetting Gitter: Towards Efficient Community Engagement

当我们开始围绕 MkDocs 的 Material 组建团队时,我们决定在 2023 年 10 月 13 日关闭并存档我们的 Gitter 频道,转而使用 GitHub Discussions。

¥As we're starting to build a team around Material for MkDocs, we've decided to sunset and archive our Gitter channel on October 13, 2023 in favor of GitHub Discussions.

为了改进 MkDocs 材料维护流程并支持社区,我们审查了不同沟通渠道的使用情况。目前, GitterGitHub 讨论区都允许向社区寻求支持,并讨论想法和问题。在过去几周,我们开始质疑这种重复是否符合我们项目的最佳利益。这篇文章解释了我们做出这一决定背后的原因。

¥As part of our efforts to improve the processes for maintaining Material for MkDocs and for supporting the community, we have reviewed the use of different communication channels. At the moment, both Gitter and GitHub Discussions allow to ask the community for support and to discuss ideas and issues. In the past weeks, we have begun to question whether this duplication is in the best interest of our project. This post explains the rationale behind our decision.

使用 git sparse-checkout 加快文档构建速度

¥Using git sparse-checkout for faster documentation builds

利用 GitHub Actions 中的 git sparse-checkout,我们可以加快存储库中的文档构建速度,将签出时间从 20 到 30 秒缩短到仅 2 秒。

¥Leveraging git sparse-checkout in GitHub Actions enabled us to speed up documentation builds in our repository, cutting checkout times from 20 to 30 seconds to just 2 seconds.

在持续集成 (CI) 工作流中,开发一种高效的文档构建方法至关重要,尤其是在像我们这样拥有数千条提交记录的大型代码库中工作时。当然,我们希望快速高效地构建文档,确保快速高效的工作流程。在使用出色的git-committersgit-revision-date-localized插件在每页底部显示文档贡献者日期时,我们需要设置fetch-depth: 0 ,这导致代码库的检出时间需要 20 到 30 秒。通过利用GitHub Actions中的git sparse-checkout功能,检出时间缩短至 2 秒。

¥Developing an efficient approach to build documentation in CI workflows is essential, especially when working in large repositories with thousands of commits, like ours. Of course, we want to build documentation quickly and efficiently, ensuring fast and productive workflows. When using both the wonderful git-committers and git-revision-date-localized plugins to display document contributors and dates at the bottom of each page, we are required to set fetch-depth: 0, which resulted in checkout times of 20 to 30 seconds on our repository. By leveraging git sparse-checkout within GitHub Actions, check out time was brought down to 2 seconds.