Dit artikel laat zien hoe je de alert-shortcode gebruikt.

Syntaxis

Inline

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

Blok

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

De parameter type is optioneel. Standaard info; beschikbare waarden: info, success, warning en danger.

Met Koptekst

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

Met Markdown-syntaxis

1{{% alert warning %}}
2Alert-shortcode met Markdown-syntaxis:
3```bash
4$ echo 'Een voorbeeld van een alert-shortcode met Markdown-syntaxis'
5```
6{{% /alert %}}

Let op: je moet de configuratie markup.goldmark.renderer.unsafe inschakelen.

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}

Voorbeelden