Skip to content

rlidwka/render-readme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Render and sanitize readme.md just like github would.

Basically, it's node.js version for this: https://github.com/github/markup

But only for markdown for now, because that's what io.js packages use mostly.

API

require('render-readme')('Hello, *world*!')

// outputs '<p>Hello, <em>world</em>!</p>\n'

Features

  • the basic rendering is commonmark + gfm extensions (emphasis slightly differs, but nobody cares anyway)
  • html is sanitized, the configuration is similar to github stuff (using sanitize-html)
  • syntax highlighting (using highlight-js for this one)
  • YAML metadata on top of markdown documents is rendered to a table
  • anchors for headers (<a name="blah"> instead of <a id="user-content-blah">, but should be good enough)

About

render and sanitize readme.md just like github would

Resources

License

Stars

Watchers

Forks

Packages

No packages published