Eleventy plugin that adds shortcodes, a global data file, and a Liquid/Nunjucks filter for embedding product cards, deal feeds, and price history powered by the ShopSavvy Data API — all resolved at build time.
Documentation · Get an API key · Other integrations
npm install eleventy-plugin-shopsavvyShips as dual ESM + CJS so it works with both 11ty 2.x (CJS) and 3.x (ESM).
// .eleventy.js (CJS) or eleventy.config.mjs (ESM)
const shopsavvy = require("eleventy-plugin-shopsavvy")
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(shopsavvy.default || shopsavvy, {
apiKey: process.env.SHOPSAVVY_API_KEY,
cacheTTL: 60_000, // optional
})
}{% shopsavvyProduct "012345678905" %}
{% shopsavvyProduct "B0DGHYDZSB", "inline" %}
{% shopsavvyProduct "012345678905", "table", "amazon", 10 %}Args: identifier, layout="card"|"inline"|"table", retailer?, limit=5.
{% shopsavvyDeals "electronics", 8, "trending", "A" %}Args: category?, limit=10, sort="trending"|"price"|"discount", grade?.
{% shopsavvyPriceHistory "012345678905", 180 %}Args: identifier, days=90, width=240, height=60. Renders an inline SVG sparkline.
<p>The current best price is {{ "012345678905" | shopsavvyPrice }}.</p>{% for deal in shopsavvyDeals | slice(0, 5) %}
<li>{{ deal.name }} — ${{ deal.price }} at {{ deal.retailer }}</li>
{% endfor %}SHOPSAVVY_API_KEY=ss_live_… bun install && bun run build
cd examples/basic && npx @11ty/eleventy./test.shMIT — see LICENSE.