Github的语法里面有5中警报强调信息,分别是NOTE TIP IMPORTANT WARNING CAUTION 。在写文章的时候,适当使用可以提高文章的可读性,并且颜色也更加丰富。下面就简单描述一下使用方式,以及效果如何。

使用方式

> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

效果

Note

Useful information that users should know, even when skimming content.

Tip

Helpful advice for doing things better or more easily.

Important

Key information users need to know to achieve their goal.

Warning

Urgent info that needs immediate user attention to avoid problems.

Caution

Advises about risks or negative outcomes of certain actions.

其他

由于primer.style没有对alerts标签进行颜色处理,所以在Gmeek的v2.19版本添加了颜色的支持,效果还是不错的,同时切换亮暗主题也有对应的变化。

参考链接:https://docs.github.com/zh/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts

❤️ 转载文章请注明出处,谢谢!❤️