I’m not sure if this is out of scope for Hugo, but I thought I’d mention it here to get some input.
As a way to being able to use far future expire headers on CSS and JS files, I’ve been using a method of adding a date to the filename, like:
style.20141003.csswhich has served me well. It’s easy to set up a rewrite on the server to just route it to
Since a rewrite like that isn’t possible on a static server such as S3 (as far as I know at least), I was thinking of a way to solve it on Hugo generation instead, but haven’t been able to figure out a way. It would basically need to rename the file on copy.
The most straight forward solution would be to use the query string way of
style.css?v123, but the last time I checked it wasn’t recommended due to issues with some proxies. That way should be possible to do quite easily right now with Hugo though.
Any other ideas?