50 words
1 minute
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://shirone.mysqil.com/posts/markdown-includes/
Author
Shirone
Published at
2026-08-28

Share Article

Generate a share poster or copy the link to share this article.

Continue reading

Related reading

Based on shared tags and categories

Take another route

A consistent pick from other articles