93 字
1 分钟
Markdown 文件包含
Shirone 支持在构建期包含本地 Markdown 文件或其指定的安全片段。
export function greet(name: string) { return `Hello, ${name}`;}同时也支持全文件包含与按行范围切片包含:
<!-- @include: src/content/snippets/include-example.md{1-4} --><!-- @include: src/content/snippets/include-example.md{5-} --><!-- @include: src/content/snippets/include-example.md{-4} -->代码块内部的包含注释将保持为纯文本字面量,不会被解析执行。
Markdown 文件包含
https://shirone.mysqil.com/posts/markdown-includes/分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
换条路线
从其他文章中稳定抽取
最后更新于 ,距今已过 5 天
部分内容可能已过时