Skip to content
A plugin to insert current number of Mailchimp subscribers to your Gatsby blog.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
gatsby-node.js
index.js
package.json
yarn-error.log
yarn.lock

README.md

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.
You can’t perform that action at this time.