amm

assemble-middleware-md

Assemble Middleware to parse markdown files. Uses Remarkable

Showing:

Popularity

Downloads/wk

1

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

39.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

assemble-middleware-md

Assemble Middleware to parse markdown files. Uses Remarkable.

The markdown helper technique is useful when all the pages in your site/collection are written in markdown, but can cause issues when your pages are a collection of different formats.

For example, your homepage might have a complicated layout that is easier to implement using handlebars, but you'd like to use markdown on interior pages that are simpler.

This middleware attaches to your app's onLoad event and only parses .md files allowing you to use the the file format best suited for a page's particular case.

This middleware uses Remarkable the same library at the heart of helper-markdown

Install

With npm

npm i assemble-middleware-md --save

Use

var markdownMid = require('assemble-middleware-md');

app.pages.onLoad(/\.md$/, markdownMid());

Now, any page with the .md extension will be processed as markdown when loaded while other file types are skipped.

Like helper-markdown you can also pass in an options object.

app.pages.onLoad(/\.md$/, markdownMid({linkify: true}));

See Remarkable's README for a complete list of options.

Tests

mocha test/*-spec.js

Release History

v0.1.0

Beta release

Contributing and Issues

Feel free to submit issues or pull requests for assemble-middleware-md. Questions on use can also be submitted to the issue queue.

License

© 2016 John O'Donnell (Critical Mash Inc.) Released under the MIT license.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100