Home

jolheiser.com @789d6e79164d617ebdcab3de53fc79457025edcc - refs - log -
-
https://git.jolheiser.com/jolheiser.com.git
my website
jolheiser.com / .eleventy.js
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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"
    }
  }
};