0.0.11 • Published 8 years ago
marq v0.0.11
marq

Generate markdown posts from JSON API responses!
Note: Currently only setup to do parsing on a static CURL return file.
Not actually hitting HubSpot's API, YET!
Install
npm install marq --save-dev
Basic Usage
import marq from 'marq';
const config = {
hubspot: {
key: 'demo',
},
dest: './_posts/',
template: require('./my-template'),
};
const remapPostData = (post) => {
return Object.assign({}, post, {
customData: 'MAGIC'
});
};
marq(config, remapPostData);
Options
hubspot
Type | Description |
---|---|
object | API credentials for Hubspot. |
dest
Type | Default | Description |
---|---|---|
string | ./_posts | Directory for marq to save posts in. |
template
Type | Description |
---|---|
string | Lodash compatible template for marq to use. |
remapPostData
Type | Description |
---|---|
function | Callback function to adjust the template post data. |
API Notes
Check out HubSpot's API docs