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!
npm install marq --save-dev
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);
Type | Description |
---|---|
object |
API credentials for Hubspot. |
Type | Default | Description |
---|---|---|
string |
./_posts |
Directory for marq to save posts in. |
Type | Description |
---|---|
string |
Lodash compatible template for marq to use. |
Type | Description |
---|---|
function |
Callback function to adjust the template post data. |
Check out HubSpot's API docs