gfm()
Create a GFM plugin that enables GitHub Flavored Markdown extensions.
import { gfm } from "@unifast/node";Signature
function gfm(options?: GfmPluginOptions): UnifastPluginParameters
options?
Configuration for individual GFM features
| Property | Type | Default | Description |
|---|---|---|---|
tables | boolean | true | Enable pipe tables with | syntax |
taskList | boolean | true | Enable - [x] / - [ ] task list checkboxes |
strikethrough | boolean | true | Enable |
footnotes | boolean | true | Enable 1 footnote references and definitions |
autolink | boolean | true | Automatically link bare URLs |
Usage
import { compile, gfm } from "@unifast/node";
const result = compile(md, {
plugins: [
gfm({
tables: true,
taskList: true,
strikethrough: true,
footnotes: true,
autolink: true,
}),
],
});