node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

express-remarkable

express-remarkable Build Status Dependency Status

An Express engine to render Markdown views

Installation

Install using npm:

npm install -S express-remarkable

Usage

Directory structure

.
├── app.js
└── views
    ├── index.md
    └── templates
        └── base.pug

2 directories, 3 files

app.js

const express = require('express');
const remarkable = require('express-remarkable');
 
const app = express();
 
app.engine('md', remarkable(app));
 
app.set('view engine', 'md');
 
app.get('/', (request, response) => {
  response.render('index');
});
 
app.listen(3000);

views/index.md

---
title: Hello, world!
template: templates/base.pug
---
 
OHAI

views/templates/base.pug

doctype html
html
  head
    meta(charset='utf-8')
    title=meta.title
  body
    !=content

License

express-remarkable is released under the MIT license.