内容注释
内容注释让补充背景紧贴句子,又不直接打断阅读流。点击小注标记即可展开内容。
基础语法
在普通正文中加入 [+label] 引用,然后在文章其它位置定义对应的注释。
Astro renders most of a page ahead of time and hydrates **interactive islands** [+islands] only when they need to become interactive.
[+islands]: An island is an interactive UI component surrounded by static HTML. This keeps the default page lightweight while preserving focused interactivity.Astro 会提前渲染页面的大部分内容,并仅在 交互式孤岛 需要变得可交互时才进行 hydration。
富文本内容
定义中可以包含段落、强调、链接、列表和行内代码 ,而周围句子照常连贯。
多重定义
复用同一个标签 ,可在单个标记后呈现一组相关的简短注释。
诸如 [+missing] 的未定义引用会保持为普通文本,因此未完成的注释永远不会生成空控件。
分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
换条路线
从其他文章中稳定抽取
最后更新于 ,距今已过 47 天
部分内容可能已过时