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);

82
package-lock.json generated
View file

@ -11,7 +11,9 @@
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^1.0.5"
"@11ty/eleventy-plugin-bundle": "^1.0.5",
"@fortawesome/fontawesome-free": "^6.6.0",
"eleventy-plugin-icons": "^4.5.1"
}
},
"node_modules/@11ty/dependency-tree": {
@ -221,6 +223,16 @@
"node": ">=6.9.0"
}
},
"node_modules/@fortawesome/fontawesome-free": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.6.0.tgz",
"integrity": "sha512-60G28ke/sXdtS9KZCpZSHHkCbdsOGEhIUGlwq6yhY74UpTiToIh8np7A8yphhM4BWsvNFtIvLpi4co+h9Mr9Ow==",
"dev": true,
"license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)",
"engines": {
"node": ">=6"
}
},
"node_modules/@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
@ -836,6 +848,23 @@
"node": ">=0.10.0"
}
},
"node_modules/eleventy-plugin-icons": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/eleventy-plugin-icons/-/eleventy-plugin-icons-4.5.1.tgz",
"integrity": "sha512-rwvLa05i6371avfdzt19KzBiVQc/9OLV7OGaD0X0sYzMFu6h+QkhtOGDTCOibUe5FXKDQGly3DQ0Us3IQlsKuw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-xml-parser": "^4.4.0",
"just-extend": "^6.2.0",
"just-memoize": "^2.2.0",
"just-typeof": "^3.2.0",
"kleur": "^4.1.5"
},
"engines": {
"node": ">=16.20.2"
}
},
"node_modules/encodeurl": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
@ -959,6 +988,29 @@
"node": ">=8.6.0"
}
},
"node_modules/fast-xml-parser": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
"integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/NaturalIntelligence"
},
{
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
}
],
"license": "MIT",
"dependencies": {
"strnum": "^1.0.5"
},
"bin": {
"fxparser": "src/cli/cli.js"
}
},
"node_modules/fastq": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
@ -1558,6 +1610,27 @@
"node": ">=0.10.0"
}
},
"node_modules/just-extend": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz",
"integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==",
"dev": true,
"license": "MIT"
},
"node_modules/just-memoize": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/just-memoize/-/just-memoize-2.2.0.tgz",
"integrity": "sha512-zriv+MY+61RXT0QsrO1ZJtL5umouqqSWmCGBkp2wJm35kniunBAA4qhUKx8Lvg/QcwrF9xuw9E6PkevKFf4boQ==",
"dev": true,
"license": "MIT"
},
"node_modules/just-typeof": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/just-typeof/-/just-typeof-3.2.0.tgz",
"integrity": "sha512-nOKazfzrQDEGNwXPfWEB64QD+ATZUnpOTJn0xMnCk41p297P9Emt3BlsRyWbu+CErMjopnFTGcYHJnvFX97ZIQ==",
"dev": true,
"license": "MIT"
},
"node_modules/kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
@ -2503,6 +2576,13 @@
"node": ">=0.10.0"
}
},
"node_modules/strnum": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==",
"dev": true,
"license": "MIT"
},
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",

View file

@ -12,6 +12,8 @@
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^1.0.5"
"@11ty/eleventy-plugin-bundle": "^1.0.5",
"@fortawesome/fontawesome-free": "^6.6.0",
"eleventy-plugin-icons": "^4.5.1"
}
}