How to exclude files with specific extensions from build?

Last time I asked How to exclude files with specific extensions from deployment?. But is there also a solution if I use only the command hugo instead of hugo deploy?

I want some file extensions not to appear in my public folder.

It is easy to delete all files with a specific file extension in a folder (with bash, Python or whatever), but is there also a more Hugo like solution? Something like a command hugo -exclude mp3?

See ignoreFiles:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.