https://github.com/jstransformers/jstransformer-gray-matter
Gray-Matter support for JSTransformers.
https://github.com/jstransformers/jstransformer-gray-matter
Last synced: 11 months ago
JSON representation
Gray-Matter support for JSTransformers.
- Host: GitHub
- URL: https://github.com/jstransformers/jstransformer-gray-matter
- Owner: jstransformers
- License: mit
- Created: 2015-04-05T19:20:38.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T04:25:42.000Z (about 6 years ago)
- Last Synced: 2025-02-21T16:35:30.844Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://npm.im/jstransformer-gray-matter
- Size: 63.5 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jstransformer-gray-matter
[Gray Matter](https://github.com/jonschlinkert/gray-matter) support for [JSTransformers](http://github.com/jstransformers).
[](https://travis-ci.org/jstransformers/jstransformer-gray-matter)
[](https://codecov.io/gh/jstransformers/jstransformer-gray-matter)
[](http://david-dm.org/jstransformers/jstransformer-gray-matter)
[](https://www.npmjs.org/package/jstransformer-gray-matter)
## Installation
npm install jstransformer-gray-matter
## API
```js
var matter = require('jstransformer')(require('jstransformer-gray-matter'))
var options = {
delims: ['~~~', '~~~']
}
var res = matter.render('~~~\ntitle: gray-matter\n~~~\nbar', options)
console.log(JSON.parse(res.body))
//=> {data: {title: 'gray-matter'}, content: 'bar', orig: '~~~\ntitle: gray-matter\n~~~\nbar'}
```
## License
MIT