I’ve just added gzipping of html, js and css to my Jekyll deploy script. The script now looks like this:
A neat trick I learned
I’m still a bit of an Ubuntu n00b and the gzipping excersize taught me about the find command, and more specifically, find combined with the –exec parameter.
The –exec parameter allows you to execute a command for every file found in your search. It has two flavours:
The first flavour runs the command for each file found, replacing {} with the filename. The second flavour runs the command once, substituting {} + with a space delimited list of all the files found by the search criteria. So:
I now have a 100 score from YSlow using the small site or blog profile (on pages without Disqus comments that is…). Huzah! ;)