directive()
Hỗ trợ container directive với cú pháp `:::name`.
import { directive } from "@unifast/node";Chữ ký
function directive(): UnifastPluginTham số
Không có.
Cách dùng
import { compile, directive } from "@unifast/node";
const result = compile(md, { plugins: [directive()] });Ví dụ
Container directive
Bạn có thể tạo kiểu cho chúng bằng CSS qua các class .directive-note, .directive-warning, tương tự như GitHub Alerts nhưng với tên hoàn toàn tùy chỉnh.
Container có thuộc tính
Nội dung lồng nhau
Directive hỗ trợ đầy đủ Markdown bên trong, bao gồm danh sách, khối mã và các định dạng inline.
-
-