This repository has been archived by the owner. It is now read-only.
An Express engine to render Markdown views
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

express-remarkable Build 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.