Obsidian 中有 callouts 语法用来创建醒目的提示框,能够在笔记中突出重要信息。Zola 中却没有这个语法,于是我借助 shortcode 也实现了类似的效果。

用法

{% callout(type="note", name="Note") %}
- **type** 表示 callout 类型,默认为 "note"
- **name** 为 callout 的标题,默认为 type 的首字母大写

hello
{% end %}

渲染结果如下:

Note
  • type 表示 callout 类型,默认为 “note”
  • name 为 callout 的标题,默认为 type 的首字母大写

效果

所有类型的 callouts 如下(完全照搬了 obsidian):

Note

This is a note callout.

Info

This is a info callout.

Todo

This is a todo callout.

Tip

This is a tip callout.

Success

This is a success callout.

Faq

This is a faq callout.

Warning

This is a WARNING callout.

Error

This is a ERROR callout.

Bug

This is a bug callout.

Example

This is a example callout.

Quote

This is a QUOTE callout.