I have a question regarding the way Hugo treats static files. Currently, it copies the entirety of the static folder. But ideally, it (in my opinion) should only copy the referenced files, either in templates or in content.
Is there a way to do this currently? (With an external tool for example?)
For the reference, I’m asking because I’m storing locally emojis from Openmojis (that would be 1500 svg icons), but only use a handful of them. It would be great to not have to filter manually those I use vs those I don’t and to have a build system that takes care of all this by itself.
Well, I understand what you mean, but in the context of Hugo, the goal of the static files is to be referenced by my website and my content, and if they are not, then I would like them to be optimized out.
In that case, maybe a whitelist kind of thing in the config file would make sense: aka “I want all the files from this folder in my public folder, but optimize the rest out.”