tancredi / fantasticon

Icon font generation tool
MIT License
906 stars 97 forks source link

Access file hash within templates #236

Open ole-flavia opened 3 years ago

ole-flavia commented 3 years ago

It would be great if the file hash, that is used for fontSrc within css templates, would be accessible by all template types.

Use case: Generate a HTML file with preload for the font, to be included within server-side rendering.

baptistemarck commented 2 years ago

that would be really nice

linuxonrails commented 2 years ago

really very nice!!!

kairos2109 commented 1 year ago

Or maybe make the hash an optional parameter.

Use case: The hash is controlled by another process (eg. CI/CD) and it's present in the file path:

https://my.cdn.com/hash/icons.css
https://my.cdn.com/hash/index.html
https://my.cdn.com/hash/icons.ttf
...

This way the HTML can preload the fonts and the CSS can reference them with relative paths.

Thoughts?