Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
/ marq Public archive

✨ Marq! The magical markdown machine ✨

Notifications You must be signed in to change notification settings

helpscout/marq

Repository files navigation

marq Build Status Coverage Status

Generate markdown posts from JSON API responses!

Magic

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