@rogovdm/gatsby-source-mailchimp

1.0.16 • Public • Published

Intro

It's a plugin a wrote for my single usecase:

Display number of my newsletter subscribers in my gatsby blog

Installation

yarn add @rogovdm/gatsby-source-mailchimp

Usage

gatsby-config.js

[
  {
    resolve: `@rogovdm/gatsby-source-mailchimp`,
    options: {
      id: '<id-of-your-list>',
      key: '<MAILCHIMP-API-KEY>'
    }
  }
];

index.js

export const pageQuery = graphql`
  query {
    allMailchimpList {
      edges {
        node {
          id
          stats {
            member_count
          }
        }
      }
    }
  }
`;
  • You can get id in settings of your list.
  • You can can your API key in account setting of your mailchimp account.

Package Sidebar

Install

npm i @rogovdm/gatsby-source-mailchimp

Weekly Downloads

0

Version

1.0.16

License

MIT

Unpacked Size

2.26 kB

Total Files

5

Last publish

Collaborators

  • rogovdm