[![npm][npm]][npm-url] [![node][node]][node-url] [![deps][deps]][deps-url] [![tests][tests]][tests-url] [![chat][chat]][chat-url]
YAML frontmatter loader for webpack. Converts YAML in files to JSON.
This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.
To begin, you'll need to install yaml-frontmatter-loader
:
$ npm install yaml-frontmatter-loader --save-dev
Then add the loader to your webpack
config. For example:
const json = require('yaml-frontmatter-loader!./file.md'); // => returns file.md as javascript object
// webpack.config.js module.exports = { module: { rules: [ { test: /\.md$/, use: [ 'json-loader', 'yaml-frontmatter-loader' ] } ] } }
And run webpack
via your preferred method.
© JS Foundation and other contributors
Licensed under the Creative Commons Attribution License 4.0.
https://webpack.js.org/loaders/yaml-frontmatter-loader