Skip to content

Instantly share code, notes, and snippets.

@bookwyrm
Created March 8, 2012 23:26
Show Gist options
  • Save bookwyrm/2004110 to your computer and use it in GitHub Desktop.
Save bookwyrm/2004110 to your computer and use it in GitHub Desktop.
Minify HTML and CSS for Jekyll
# Usage: rake minify
desc "Minify files"
task :minify do
system "java -jar _build/yuicompressor.jar --verbose --type css -o assets/themes/the-program/css/style.min.css assets/themes/the-program/css/style.css"
system "java -jar _build/htmlcompressor.jar -r --type html -o _site _site"
end # task :minify
@matthodan
Copy link

You might want to take a look at Jekyll Asset Pipeline. It adds a powerful asset pipeline to Jekyll and supports conversion of CoffeeScript, Sass, Less or any other language via custom preprocessors. It can also automatically compress assets with Yahoo's YUI Compressor or Google's Closure Compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment