This article shows how to use the alert shortcode.

Syntax#

Inline#

{{< alert [type] >}}INLINE ALERT{{< /alert >}}

Block#

{{< alert [type] >}}
BLOCK ALERT
{{< /alert >}}

The parameter type is optional. Default to info, availiable values: info, success, warning and danger.

With Heading#

{{< alert [type] >}}
{{< alert-heading >}}Well Done!{{< /alert-heading >}}
ALERT MESSAGE
{{< /alert >}}

With Markdown Syntax#

{{% alert warning %}}
Alert Shortcode with Markdown Syntax:
```bash
$ echo 'An example of alert shortcode with the Markdown syntax'
```
{{% /alert %}}

Alert Shortcode with Markdown Syntax:

$ echo 'An example of alert shortcode with the Markdown syntax'

Please note that you’ll need to enable the markup.goldmark.renderer.unsafe configuration.

[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true
markup:
  goldmark:
    renderer:
      unsafe: true
{
   "markup": {
      "goldmark": {
         "renderer": {
            "unsafe": true
         }
      }
   }
}

Examples#