This article shows how to use the alert shortcode.
Important
Since
v1.8.0, you can create alerts without shortcode, see blockquote alerts.
Syntax
Inline
1</* alert [type] */>INLINE ALERT</* /alert */>
Block
1</* alert [type] */>
2BLOCK ALERT
3</* /alert */>
The parameter
typeis optional. Default toinfo, available values:info,success,warninganddanger.
With Heading
1</* alert [type] */>
2</* alert-heading */>Well Done!</* /alert-heading */>
3ALERT MESSAGE
4</* /alert */>
With Markdown Syntax
1%/* alert warning */%
2Alert Shortcode with Markdown Syntax:
3```bash
4$ echo 'An example of alert shortcode with the Markdown syntax'
5```
6%/* /alert */%
% alert warning % % code/alert-with-markdown-example % % /alert %
Please note that you’ll need to enable the markup.goldmark.renderer.unsafe configuration.
< code-toggle filename=“config” > % config/markup-goldmark-renderer-unsafe % < /code-toggle >
Examples
< alert primary >Primary< /alert >
< alert >Info< /alert >
< alert success > Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content. < /alert >
< alert warning >Warning< /alert >
< alert danger >Danger< /alert >
< alert “success” > < alert-heading >Well Done!< /alert-heading > Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content. < /alert >
Comments