Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 1.69 KB

README.md

File metadata and controls

35 lines (19 loc) · 1.69 KB

Grav Snipcart Plugin

Snipcart is a Grav plugin that adds support for the very simple and nicely done Snipcart Shop.

Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to snipcart.

You should now have all the plugin files under

/your/site/grav/user/plugins/snipcart

NOTE: This plugin is a modular component for Grav which requires Grav, the Error and Problems plugins, and a theme to be installed in order to operate.

Usage

In order to use Snipcart you need to have an API key. You first need to register, if you aren't already.

Once you have signed up and confirmed your account, log in and head to the Account > Credentials section, where you will find your API key.

Notice that you’ll be in test mode by default, thus using your test API key.

Reference: Snipcart Documentation.

When you have the API key you can now edit the plugin to use it. To do so go to the user/plugins/snipcart/ folder and create the file snipcart.yaml, if it doesn't exist already, and copy the contents of the file snipcart.yaml in it.

Edit the file and replace YOUR_API_KEY with the key that Snipcart provides you with.

Note: If you want to see this plugin in action, have a look at our Shop Site Skeleton

Config Defaults

api_key: YOUR_API_KEY