gfm()
Membuat plugin GFM yang mengaktifkan ekstensi GitHub Flavored Markdown.
import { gfm } from "@unifast/node";Signature
function gfm(options?: GfmPluginOptions): UnifastPluginParameter
options?
Konfigurasi untuk masing-masing fitur GFM
| Properti | Tipe | Default | Deskripsi |
|---|---|---|---|
tables | boolean | true | Mengaktifkan pipe table dengan sintaks | |
taskList | boolean | true | Mengaktifkan checkbox task list - [x] / - [ ] |
strikethrough | boolean | true | Mengaktifkan sintaks strikethrough |
footnotes | boolean | true | Mengaktifkan referensi footnote 1 dan definisinya |
autolink | boolean | true | Secara otomatis melakukan link pada URL telanjang |
Penggunaan
import { compile, gfm } from "@unifast/node";
const result = compile(md, {
plugins: [
gfm({
tables: true,
taskList: true,
strikethrough: true,
footnotes: true,
autolink: true,
}),
],
});