https://github.com/malbernaz/blog-post-loader
A webpack loader for blog posts.
https://github.com/malbernaz/blog-post-loader
Last synced: 10 months ago
JSON representation
A webpack loader for blog posts.
- Host: GitHub
- URL: https://github.com/malbernaz/blog-post-loader
- Owner: malbernaz
- License: mit
- Created: 2017-07-18T22:45:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-19T01:00:55.000Z (over 8 years ago)
- Last Synced: 2025-01-12T14:47:38.912Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.59 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blog-post-loader
A very simple markdown loader that accepts yml meta data.
## How it works
Given the input:
```md
---
title: a title
description: test description
---
# heading 1
- buy pineapple
## heading 2
_italic_ is the new __bold__
```
`blog-post-loader` returns an output:
```js
{
meta: {
title: "a title",
description: "test description"
},
html: "...parsed markdown..."
}
```
## How to configure
Install `blog-post-loader`:
```sh
npm install blog-post-loader
```
and configure your `webpack.config.js`:
```js
module.exports = {
module: {
rules: [
{
test: /\.md/$,
loader: "blog-post-loader",
options: {/* ... */} // marked options. See https://github.com/chjj/marked#options-1
}
]
}
}
```
## License
[MIT](https://github.com/malbernaz/blog-post-loader/blob/master/LICENSE)