(Note: this forked package has been altered to work better with highlight.js, instead of github.com's Linguist.)
Package github_flavored_markdown provides a GitHub Flavored Markdown renderer with fenced code block highlighting, clickable header anchor links.
The functionality should be ALMOST equivalent to the GitHub Markdown API endpoint specified at https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode, except the rendering is performed locally.
See examples for how to generate a complete HTML page, including CSS styles.
go get -u github.com/indraniel/github_flavored_markdown