Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including express-remarkable with all npm packages installed. Try it out:

var expressRemarkable = require("express-remarkable")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

express-remarkable v0.4.0

An Express engine to render Markdown views

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.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free