NJAldwin / eleventy-plugin-gen-favicons

Favicon generator plugin for eleventy
MIT License
15 stars 4 forks source link

change output href in html tags #5

Open saiballo opened 1 year ago

saiballo commented 1 year ago

Hello,

I successfully customized outputdir like this:

outputDir: "./static/assets/img/favicon"

but tags generated are like these:

<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.webmanifest">

is it possible to customize the href path?

thank you

NJAldwin commented 1 year ago

Hello,

This is a good point! Though /favicon.ico should supposedly be at the root for backwards compatibility, it seems reasonable to allow an override if desired. I can add a separate parameter for the path.

saiballo commented 1 year ago

thank you so much!

ingoradatz commented 1 year ago

Instead of a new path parameter you could subtract the eleventy dir.output value from your outputDir parameter value and prepend it to the dest* vars of the files when you generate via html-gen.js

saiballo commented 1 year ago

I think a parameter is more usefull

saiballo commented 9 months ago

hello,

any news on this new feature?

thanks!