This article shows how to use the alert
shortcode.
Syntax#
Inline#
Block#
The parameter
type
is optional. Default toinfo
, availiable values:info
,success
,warning
anddanger
.
With Heading#
{{< alert [type] >}}
{{< alert-heading >}}Well Done!{{< /alert-heading >}}
ALERT MESSAGE
{{< /alert >}}
markdown
With Markdown Syntax#
{{% alert warning %}}
Alert Shortcode with Markdown Syntax:
```bash
$ echo 'An example of alert shortcode with the Markdown syntax'
```
{{% /alert %}}
markdown
Alert Shortcode with Markdown Syntax:
Please note that you’ll need to enable the markup.goldmark.renderer.unsafe
configuration.
Examples#
Info
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.
Warning
Danger
Comments