Butterfly 和 tag-plugins-plus 的标签外挂在这里用标准的 Markdown 语法表达:GitHub 风格的提示块,以及 remark-directive 指令。样式与原版一一对应。
提示块(GitHub Alerts)
最常用的五种提示直接用 GitHub 的写法,在 GitHub 上预览时也能正确显示:
对应 Butterfly 的 {% note info %}。
对应 {% note success %}。
对应 {% note primary %}。
对应 {% note warning %}。
对应 {% note danger %}。
> [!TIP]> 对应 `{% note success %}`。Note:完整的 Butterfly 变体
GitHub 写法覆盖不到的样式(default、颜色、modern / simple / disabled、自定义图标)用 :::note:
default 样式
自定义 Font Awesome 图标
modern 样式
:::note{.blue .flat icon="fas fa-bullhorn"}自定义 Font Awesome 图标:::Tip
info 类型
bolt 类型。另有 home key bell cogs warning success error ban sync
加上 .faa-horizontal .animated 图标会左右晃动
:::tip{type=warning .faa-horizontal .animated}加上动画类名:::折叠块
点击展开
折叠内容,支持任意 Markdown。颜色可选 blue cyan green yellow orange red purple,加 open 默认展开。
:::details[点击展开]{.green open}折叠内容:::标签页
npm installpnpm installyarn::::tabs:::tab[npm]内容::::::tab[pnpm]内容:::::::键盘可用:聚焦标签后用方向键切换。
行内元素
彩色文字:红色、绿色、蓝色、大号
隐藏文字:答案是 42(悬停或聚焦显示)
气泡注释:Astro一个以内容为中心的 Web 框架
:span[红色]{.red} :spoiler[42]:tooltip[Astro]{tip="一个以内容为中心的 Web 框架" color="#DC143C"}复选框与单选框
和 tag-plugins-plus 一样是块级元素,每个占一行:
已完成
未完成
选中
未选中
:checkbox[已完成]{.green checked}
:radio[选中]{.cyan checked}颜色可选 red green blue cyan yellow。
网站卡片
::site{name="Astro" url="https://astro.build/" screenshot="/img/covers/1.svg" avatar="/img/favicon.svg" description="站点描述"}