The

ootstrap

shortcode documentation


An alert can be embedded as follows:

{{< alert <NAME> (icon) (dismiss) (escape) >}}
# Heading
I'm a `primary` **Alert** [with hyperlinks](/hugo-bootstrap-shortcodes/).
{{</ alert >}}

<NAME> can be exchanged with one of the following values:

icon is an optional argument, a small icon appears on the left side of the alert (see examples below).

If the user should be able to dismiss the alert by clicking on a X in the top right corner, the optional argument dismiss needs to be given.

If you use custom HTML inside of the alert, such as other Bootstrap shortcodes (e.g. icons, you need to specify the escape parameter so that the HTML will be escaped and unescaped.

Examples