2.0.0 • Published 5 years ago
@jamshop/eleventy-plugin-svg v2.0.0
Eleventy Plugin - SVG
A simple shortcode to fetch and optimise SVG assets. Always will always return inline SVG.
Install:
npm install @jamshop/eleventy-plugin-svgUsage
In .eleventy.js:
eleventyConfig.addPlugin(svgPlugin, {
input: "src/svg/"
});In templates:
{% svg "name-of-svg", "optional classnames added to svg element" %}Filename should be without the extension (plugin assumes .svg).