gatsby-plugin-snipcart

1.1.2 • Public • Published

gatsby-plugin-snipcart

A plugin for using Snipcart with Gatsby.

Usage

In your gatsby-config.js file, add:

module.exports = {
    plugins: [
        {
            resolve: 'gatsby-plugin-snipcart',
            options: {
                apiKey: 'YOUR_SNIPCART_KEY'
            }
        }
    ]
}

Options

apiKey (required): Your Snipcart API key. If not set, it will try to find it in process.env.GATSBY_SNIPCART_APIKEY.

autopop: Whether or not the cart will open once a product is added. (Defaults to false)

js: A Snipcart JavaScript file. (Defaults to https://cdn.snipcart.com/scripts/2.0/snipcart.js)

jquery: A jQuery file to link to. Set to false for none. (Defaults to https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js)

styles: A stylesheet file to link to. Set to false for none. (Defaults to https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css)

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i gatsby-plugin-snipcart

    Weekly Downloads

    23

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    10.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • amadoa
    • dalewray
    • codevelopit
    • mastaaaron
    • escasports
    • tbaustin
    • ken85rose