add fontawesome icons support

This commit is contained in:
Lyn Fugmann 2024-09-24 17:54:42 +02:00
parent 06e0e016ba
commit b30295da9d
3 changed files with 93 additions and 2 deletions

View file

@ -1,6 +1,7 @@
const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
const bundlerPlugin = require("@11ty/eleventy-plugin-bundle");
const pluginIcons = require('eleventy-plugin-icons');
const fs = require('fs');
// update this :)
@ -14,6 +15,14 @@ module.exports = function(eleventyConfig) {
defaultLanguage: "de",
});
eleventyConfig.addPlugin(bundlerPlugin);
let fontawesomePath = "node_modules/@fortawesome/fontawesome-free/svgs";
eleventyConfig.addPlugin(pluginIcons, {
sources: [
{ name: "regular", path: `${fontawesomePath}/regular`, default: true },
{ name: "solid", path: `${fontawesomePath}/solid` },
{ name: "brands", path: `${fontawesomePath}/brands` },
],
});
eleventyConfig.addGlobalData("year", year);
eleventyConfig.addGlobalData("eseColor", eseColor);