Nanoseconds Produce Minutes
    Wondering what’s next for npm?Check out our public roadmap! »

    express-remarkable

    1.0.0 • Public • Published

    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.

    Install

    npm i express-remarkable

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar