README.md in jekyll-assets-0.5.1 vs README.md in jekyll-assets-0.5.2

- old
+ new

@@ -168,15 +168,10 @@ body background-color: <%= (12 == Date.today.month) ? "red" : "white" %> ``` -*Note* that all assets are pre-processed with Liquid. So if you just need to - output asset URL within your javascript/coffeescript or pure css, you don't - need to use ERB, just use `asset_path` Liquid tag same as you do it in your - layouts/pages. See "Liquid Assets Pre-processing" for more details. - Want more? Sure, here you are. You can use JavaScript templating with EJS or ECO for example. Create a file `_assets/javascripts/hello.jst.ejs` with following contents: ``` html @@ -213,22 +208,23 @@ ``` [amazon-s3]: http://aws.amazon.com/s3 -## Liquid Assets Pre-processing +### Compilation Cache -All javascript and stylesheet assets are preprocessed with Liquid automagically. -That means that you can use all liquid tags available to you in Jekyll, but most -like;y you would want it for `asset_path` tag only: +To improve build time, we have Sprockets caching enabled. You might want to +clean this cache time after time with `assets:cleanup` jekyll command: -``` coffeescript -# file: _assets/javascripts/app.js.coffee -yepnope.load "{% asset_path app.css %}" -``` + $ jekyll assets:cleanup +You can turn caching off with `cache_assests` configuration option. +At the moment we use *FileStore* cache which keeps compiled data on file system. +If you need MemCache or Redis based store, please raise a ticket. + + ## Custom Vendors Sometimes you would like to have some 3rd-party vendors. For this purposes, normally all you have to do is to override default assets sources in config: @@ -451,9 +447,15 @@ # source file: _assets/javascripts/app.css # output file: _site/assets/javascriptis/app-4f41243847da693a4f356c0486114bc6.css # output URL: /assets/javascripts/app-4f41243847da693a4f356c0486114bc6.css # cachebust: hard + # + # Whenever or not cache compiled assets (enabled by default). + # Caching significantly improves compilation performance, but you might need + # clean it up time after time with `jekyll assets:cleanup` command. + # + cache_assets: true # # Specifies list of MIME types that needs to have gzipped versions. # You can set it to `false` to disable gzipping. Only javascripts and # stylesheets are gzipped by default. #