Go

Markdown libraries for Go, from the modern goldmark to the long-serving Blackfriday. Back to the overview.

goldmark

CommonMark-compliant, extensible and fast — the parser used by Hugo.

CommonMarkextensible
import (
    "bytes"
    "github.com/yuin/goldmark"
)

var buf bytes.Buffer
goldmark.Convert([]byte("# Hello *world*"), &buf)

View goldmark →

gomarkdown

A parser and HTML renderer with an exposed AST, forked from Blackfriday.

AST
import "github.com/gomarkdown/markdown"

html := markdown.ToHTML([]byte("# Hello *world*"), nil, nil)

View gomarkdown →

Blackfriday

The original, battle-tested Go Markdown processor.

classic
import "github.com/russross/blackfriday/v2"

html := blackfriday.Run([]byte("# Hello *world*"))

View Blackfriday →