madrilene / lenesaile.com

My personal website built with Eleventy. It supports three languages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate favicon files in output dir?

bobmonsour opened this issue · comments

I could be wrong about this, but it seems that when you combine this:

['src/assets/fonts/', 'src/assets/images/', 'src/assets/pdf/'].forEach(path =>
  eleventyConfig.addPassthroughCopy(path)
);

with this:

eleventyConfig.addPassthroughCopy({
  'src/assets/images/favicon/*': '/'
});

you end up with all of the favicon files in the root directory of the site (desired) as well as in the /assets/images/favicon directory of the site (probably not needed).

My solution would be to treat the favicon directory as a special class of assets, placing the favicon directory directly inside of the assets directory. This makes conceptual sense to me as not all of the files in the favicon directory are images.

I might not even need to copy the whole image folder. I'll look into that!

Fixed! Now I do not copy the whole folder, but only the few needed files directly.
Thanks for the hint!