Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 623 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 623 Bytes

express-markdown

Express middleware for rendering markdown files

It looks for URIs ending in ".md" example: http://mysite.com/README.md

Usage

// !!!IMPORTANT: place this before static or similar middleware
app.use(require('express-markdown')({

  // directory where markdown files are stored
  // required
  directory: __dirname + '/public', 

  // view to use for rendering markdown file
  // optional
  // default is undefined, no view
  view: 'foo',

  // name of markdown variable passed in the context when rendering
  // optional
  // default 'markdown'
  variable: 'bar'

}));