Dieser Artikel zeigt, wie Sie den Shortcode alert verwenden.

Syntax

Inline

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

Blockieren

1{{< alert [type] >}}
2BLOCK ALERT
3{{< /alert >}}

Der Parameter type ist optional. Standardmäßig info, verfügbare Werte: info, success, warning und danger.

Mit Überschrift

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

Mit Markdown-Syntax

1{{% alert warning %}}
2Alert Shortcode with Markdown Syntax:
3```bash
4$ echo 'Ein Beispiel für einen Alarm-Shortcode mit der Markdown-Syntax'
5```
6{{% /alert %}}

Bitte beachten Sie, dass Sie die markup.goldmark.renderer.unsafe-Konfiguration aktivieren müssen.

config.toml

1[markup]
2  [markup.goldmark]
3    [markup.goldmark.renderer]
4      unsafe = true

config.yaml

1markup:
2  goldmark:
3    renderer:
4      unsafe: true

config.json

1{
2   "markup": {
3      "goldmark": {
4         "renderer": {
5            "unsafe": true
6         }
7      }
8   }
9}

Beispiele