18 lines
435 B
JavaScript
18 lines
435 B
JavaScript
const icons = require('simple-icons');
|
|
|
|
module.exports = function(eleventyConfig) {
|
|
|
|
eleventyConfig.addShortcode("icon", (name) => {
|
|
const iconName = "si" + name.charAt(0).toUpperCase() + name.substr(1).toLowerCase();
|
|
const icon = icons[iconName];
|
|
return `<title>${icon.title}</title><path fill="#${icon.hex}" d="${icon.path}"></path>`
|
|
});
|
|
|
|
return {
|
|
dir: {
|
|
input: "src",
|
|
output: "dist"
|
|
}
|
|
}
|
|
};
|