Skip to content

Commit d744a87

Browse files
committed
docs: update documentation
1 parent e044476 commit d744a87

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ module.exports = function (eleventyConfig) {
2727
};
2828
```
2929

30+
If you would like to compile more than 1 svgsprite, pass an array of config objects with unique `svgSpriteShortcode` **(important)**:
31+
32+
```js
33+
const svgSprite = require("eleventy-plugin-svg-sprite");
34+
35+
module.exports = function (eleventyConfig) {
36+
eleventyConfig.addPlugin(svgSprite, [
37+
{
38+
path: "./src/assets/svg_1", // relative path to SVG directory
39+
svgSpriteShortcode: "svgsprite1",
40+
},
41+
{
42+
path: "./src/assets/svg_2", // relative path to SVG directory
43+
svgSpriteShortcode: "svgsprite2",
44+
}
45+
]);
46+
};
47+
```
48+
Refer to [demo/array_config/.eleventy.js](./demo/array_config/.eleventy.js) for a sample.
49+
3050
## Config Options
3151

3252
| Option | Type | Default | Description |

0 commit comments

Comments
 (0)