Repository
Current version released
3 years ago
Goldmark
A very fast Markdown compiler for Deno 🦕
Powered by Go’s Goldmark compiled to WASM.
Usage
Basic Example
import { init, transform } from "https://deno.land/x/goldmark/mod.ts";
await init();
const markdown = await Deno.readTextFile(new URL('./content.md', import.meta.url));
const { frontmatter, content } = await transform(markdown, {
render: {
unsafeHTML: true
},
extensions: {
GFM: true,
typographer: true,
}
})
console.log(frontmatter);
console.log(content);
Performance
Runs come in well under 1ms
on average. See bench/mod.ts
.
Sampling 100,000 runs completed in 58s
with an average run of 0.57ms
.