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/th/posts/markdown-includes/
ผู้เขียน
Shirone
เผยแพร่เมื่อ
2026-08-28
สัญญาอนุญาต
CC BY-NC-SA 4.0

แชร์บทความ

สร้างรูปภาพแชร์หรือคัดลอกลิงก์เพื่อส่งต่อบทความนี้

อ่านต่อ

บทความที่เกี่ยวข้อง

อิงจากแท็กและหมวดหมู่ร่วมกัน

ลองเส้นทางอื่น

คัดเลือกจากบทความอื่นด้วยเกณฑ์ที่คงที่