jekyll-shopsavvy

Jekyll plugin that adds Liquid tags and filters for embedding live product cards, deal feeds, and price lookups powered by the ShopSavvy Data API. Everything runs at build time, so the generated site stays static.

Documentation · Get an API key · Other integrations

Install

Add to your Gemfile:

group :jekyll_plugins do
  gem "jekyll-shopsavvy"
end

Then:

bundle install

Register the plugin in _config.yml:

plugins:
  - jekyll-shopsavvy

shopsavvy:
  api_key: ENV["SHOPSAVVY_API_KEY"]

Heads up: GitHub Pages safe mode whitelists only specific plugins, and jekyll-shopsavvy is not on that list. To deploy a Jekyll site that uses this gem to GitHub Pages, build with GitHub Actions and publish the resulting _site/ directory — that path supports any plugin.

Tags

{% shopsavvy_product %}

Renders a product with offers from across retailers.

{% shopsavvy_product "012345678905" %}
{% shopsavvy_product "B0DGHYDZSB" layout="inline" %}
{% shopsavvy_product "012345678905" layout="table" retailer="amazon" limit=10 %}

Layouts: card (default), inline, table.

{% shopsavvy_deals %}

Renders a grid of trending deals.

{% shopsavvy_deals category="electronics" limit=8 %}
{% shopsavvy_deals sort="discount" grade="A" %}

{% shopsavvy_price %}

Inline price text — useful for headlines or sentences.

The current best price is {% shopsavvy_price "012345678905" %}.

Filter

{% assign product = "012345678905" | shopsavvy_lookup %}
<h2>{{ product.data[0].name }}</h2>

Configuration

Read in this order:

  1. ENV["SHOPSAVVY_API_KEY"]
  2. _config.ymlshopsavvy.api_key

Test

./test.sh

License

MIT — see LICENSE.