0.1.0 • Published 7 years ago

blog-post-loader v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

blog-post-loader

A very simple markdown loader that accepts yml meta data.

How it works

Given the input:

---
title: a title
description: test description
---

# heading 1

- buy pineapple

## heading 2

_italic_ is the new __bold__

blog-post-loader returns an output:

{
  meta: {
    title: "a title",
    description: "test description"
  },
  html: "...parsed markdown..."
}

How to configure

Install blog-post-loader:

npm install blog-post-loader

and configure your webpack.config.js:

module.exports = {
  module: {
    rules: [
      {
        test: /\.md/$,
        loader: "blog-post-loader",
        options: {/* ... */} // marked options. See https://github.com/chjj/marked#options-1
      }
    ]
  }
}

License

MIT