diff options
author | Yorhel <git@yorhel.nl> | 2021-01-17 16:49:19 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-01-17 17:00:46 +0100 |
commit | 074bf602f896ebd9eb3c8b2c130eca05299a44dc (patch) | |
tree | c16c42a0c54dfe11f5e38120429a984c9e2ed5ee /Makefile | |
parent | 7be45b3ed34537746454bf93e5a67be648b0b46a (diff) |
Make/CSS: Put icons.css file hash in the URL
Advantage is that it's both more robust and avoids unecessary reloads
when the file hasn't changed. The -strip argument to convert is needed
in order to generate icons.png in a deterministic way; without that it
includes a creation timestamp in the file metadata.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -93,7 +93,7 @@ static/g/icons.opt.png: static/g/icons.png zopflipng -m --lossy_transparent $< $@ static/g/%.css: css/skins/%.sass css/v2.css data/icons/icons.css | static/g - ( echo '$$version: "$(shell git show-ref --head --abbrev -s HEAD)";'; echo '@import "css/skins/$*"' ) | sassc --stdin -I. --style compressed >$@ + ( echo '$$icons-version: "$(shell sha1sum static/g/icons.png | head -c8)";'; echo '@import "css/skins/$*"' ) | sassc --stdin -I. --style compressed >$@ |