uncenter / eleventy-plugin-icons

✨ A plugin for Eleventy to add and transform icons from any icon set.
https://www.npmjs.com/package/eleventy-plugin-icons
MIT License
11 stars 0 forks source link

Allow for custom icon name to file name logic #61

Closed uncenter closed 6 months ago

uncenter commented 6 months ago

Something like...

{
  sources: [{ name: 'custom', path: './src/icons', getFilename: (iconName) => iconName + '-solid.svg' }];
}

Given the example above, {% icon "custom:my-icon" %} would look for the file ./src/icons/my-icon-solid.svg (path + getFilename).

cc @ryanccn