0.7.0 • Published 6 years ago

markdown-it-loader v0.7.0

Weekly downloads
169
License
MIT
Repository
github
Last release
6 years ago

markdown-it loader for webpack Version Build Status

Parses source as Markdown using the awesome markdown-it parser.

By default, markdown-it-loader will highlight code blocks using highlight.js.

Installation

$ npm install --save markdown-it-loader markdown-it highlight.js

Usage

Documentation: Using loaders

In your webpack.config.js file:

var subscript = require('markdown-it-sub');
var superscript = require('markdown-it-sup');

module.exports = {
  module: {
    loaders: [{
      test:   /\.md/,
      loader: 'markdown-it',
      options: {
        preset: 'default',
        typographer: true,
        use: [subscript, superscript]
      }
    }]
  }
};

If you need to use a plugin that requires extra options such as markdown-it-container, you can use the following syntax:

var container = require('markdown-it-container');
var subscript = require('markdown-it-sub');
var superscript = require('markdown-it-sup');

module.exports = {
  module: {
    loaders: [{
      test:   /\.md/,
      loader: 'markdown-it',
      options: {
        preset: 'default',
        typographer: true,
        use: [subscript, superscript, [container, "contained"]]
      }
    }]
  }
};

Meta

Contributors

License

Copyright (c) 2014 Daniel Perez Alvarez (unindented.org). This is free software, and may be redistributed under the terms specified in the LICENSE file.

0.7.0

6 years ago

0.6.0

7 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago