50 文字
1 分
Markdown File Includes

Shirone can include a local Markdown file or a safe slice of one.

export function greet(name: string) {
return `Hello, ${name}`;
}

The full file and line-range forms are also supported:

src/content/snippets/include-example.md
<!-- @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} -->

Include comments inside fenced code remain literal.

Markdown File Includes
https://blog.kagurayami.top/ja/posts/markdown-includes/
作者
Shirone
公開日
2026-08-28
ライセンス
CC BY-NC-SA 4.0

記事をシェア

シェアカードを生成するかリンクをコピーして、みんなと共有しましょう。

続きを読む

関連記事

共通するタグとカテゴリから

別のルートへ

ほかの記事から一貫した基準で選出