markdownify

0.1.0 • Public • Published

markdownify

Render markdown to HTML and require it in your front-end JavaScript.

Features

  • easy integration into build systems
  • markdown rendering with marked
  • syntax highlighting using pygmentize
  • uses GitHub Flavoured Markdown

Using

In your front-end code:

var blogPost = require('./markdown/post');
 
$('#content').html(blogpost);

In your build system:

/* Require browserify-markdown */
var markdownify = require('markdownify');
 
/* Configure Browserify to require markdown documents: */
var bify = browserify({
    extensions: [ '.md', '.markdown' ]
});
 
/* Set the transform for markdown documents: */
bify.transform(markdownify);
 
/* Add the entry point for Browserify. */
bify.add('./src/main.js');

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.079latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.079

Package Sidebar

Install

npm i markdownify

Weekly Downloads

79

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bitjutsu