Markdown 扩展特性
GitHub 仓库卡片
你可以添加动态卡片,链接到 GitHub 仓库;页面加载时,仓库信息会从 GitHub API 拉取。
用下面的代码创建一个 GitHub 仓库卡片:::github{repo="<owner>/<repo>"}。
::github{repo="saicaca/fuwari"}Mermaid 图表
围栏 mermaid 代码块会被渲染为图表,并遵循当前的配色方案。
flowchart LR
accTitle: Markdown rendering pipeline
accDescr: Markdown source is transformed into semantic HTML and then enhanced as a themed SVG diagram.
A[Markdown source] --> B[Astro content pipeline]
B --> C[Semantic HTML]
C --> D[Themed diagram]提示框
支持以下类型的提示框:note tip important warning caution
基础语法
:::noteHighlights information that users should take into account, even when skimming.:::
:::tipOptional information to help a user be more successful.:::自定义标题
提示框的标题可以自定义。
:::note[MY CUSTOM TITLE]This is a note with a custom title.:::GitHub 语法
> [!NOTE]> The GitHub syntax is also supported.
> [!TIP]> The GitHub syntax is also supported.剧透
你可以在文字中加入剧透。文字同样支持 Markdown 语法。
内容 !
The content :spoiler[is hidden **ayyy**]!图片宽度与图注
独立的图片在其 alt 文本中接受一个可选的 w-N% 宽度标记,以及一个 Markdown 标题,该标题会作为图片下方居中的图注显示:

有效宽度范围是 w-1% 到 w-100%;无效的标记会保留在 alt 文本中。宽度与图注相互独立——仅设置标题也会生成图注:


Markdown 扩展特性
https://xiaobuhui.xyz/posts/markdown-extended/分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
换条路线
从其他文章中稳定抽取
最后更新于 ,距今已过 683 天
部分内容可能已过时