本文將介紹如何使用 alert
shortcode。
語法§
Inline§
Block§
The parameter
type
is optional. Default toinfo
, available values:info
,success
,warning
anddanger
.
帶有標題§
1{{< alert [type] >}}
2{{< alert-heading >}}Well Done!{{< /alert-heading >}}
3ALERT MESSAGE
4{{< /alert >}}
markdown
帶有 Markdown 格式§
1{{% alert warning %}}
2Alert Shortcode with Markdown Syntax:
3```bash
4$ echo 'An example of alert shortcode with the Markdown syntax'
5```
6{{% /alert %}}
markdown
Alert Shortcode with Markdown Syntax:
請注意,你需要開啟 markup.goldmark.renderer.unsafe
配置。
例子§
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
評論