Github Markdown Alerts
I was working on some rust code and ran across the README for cargo shear
I’m a huge fan of these types of alerts in docs, it’s one of the things I miss from systems like Sphinx and something I tend to add (or at least strive to add) to any markdown docs using something like MDX.
So I immediately started to investigate how they accomplished it. I wrongly fully assumed it was an image or some injected CSS magic.
Lucky for all of us I was wrong, it’s fully supported by Github!
If you use these special bits of Github flavored Markdown:
> [!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. It will render like this!
I for one am super happy I found this and will likely overuse it until my co-workers are a bit annoyed.