This plugin adds a shortcode to your Eleventy project to easily include icons from the Feather Icons collection.
Install the plugin from npm:
npm install eleventy-plugin-feathericons --save-dev
class - The class attribute to be added to the svg element.feather feather-xwidth - The width attribute to be added to the svg element.24height - The height attribute to be added to the svg element.24stroke - The stroke color attribute.currentColorstroke-width - The stroke width attribute.2stroke-linecap - The stroke linecap attribute.roundstroke-linejoin - The stroke linejoin attribute.roundfill - The fill attribute.noneAdd it to your Eleventy Config config file:
import eleventyPluginFeathericons from 'eleventy-plugin-feathericons';
export default function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyPluginFeathericons);
};
const eleventyPluginFeathericons = require('eleventy-plugin-feathericons');
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyPluginFeathericons);
};
import eleventyPluginFeathericons from 'eleventy-plugin-feathericons';
export default function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyPluginFeathericons, {
class: "feather",
width: 24,
height: 24,
stroke: "currentColor",
"stroke-width": 2
});
};
Red stroke:
Thick stroke:
Large (48px):
Filled: