Goes in your theme’s directory, same as the theme.liquid. The file is formatted with YAML. Be sure to indent lines with spaces, not tabs.
Example YAML config.yml
file:
---
css:
head:
- css/reset.css
- css/type.css
- css/global.css
- css/filter.css
- /javascripts/jquery-ui/css/ui-lightness/jquery-ui-1.8.18.custom.css
js:
all:
- scripts/libs/cookie.js
- scripts/libs/easing.js
- scripts/libs/localscroll.js
- scripts/libs/modernizr.js
- scripts/libs/scrollto.js
- scripts/libs/slides.js
- scripts/libs/tinyscrollbar.js
- scripts/libs/cycle.js
- scripts/libs/crawler.js
- scripts/main.js
- scripts/home.js
- /javascripts/jquery-ui/js/jquery-ui-1.8.18.custom.min.js
products:
per_page: 25
disable_prototype: false
Files are relative to your theme’s asset directory.
The css minification also supports SASS and SCSS files:
---
css:
head:
- css/foo.sass
- css/bar.scss
You can then include those css and js minified files with:
{{ "head" | css_minify_tag }}
Outputs:
<link href="http://cdn2.crystalcommerce.com/assets/www.example.com/head.css" type="text/css" media="screen" rel="stylesheet" />
{{ "all" | js_minify_tag }}
Outputs:
<script src="http://cdn3.crystalcommerce.com/assets/www.example.com/all.js"></script>
For debugging purposes, you can pass true to either of the minify_tag
filters to have it print out the tags. For example:
{{ "head" | css_minify_tag: true }}
Outputs:
<link href="/files/assets/css/reset.css" type="text/css" media="screen" rel="stylesheet" /> <link href="/files/assets/css/type.css" type="text/css" media="screen" rel="stylesheet" /> <link href="/files/assets/css/global.css" type="text/css" media="screen" rel="stylesheet" /> <link href="/files/assets/css/filter.css" type="text/css" media="screen" rel="stylesheet" /> <link href="/javascripts/jquery-ui/css/ui-lightness/jquery-ui-1.8.18.custom.css" type="text/css" media="screen" rel="stylesheet" />
Unfortunately, the debug flag does not support SASS or SCSS at this time.
You can change the number of products returned on the category browse view with the products.per_page
setting, like:
---
products:
per_page: 25
The default is 25. Increasing this number will decrease performance.
You can disable prototype responses from the server, and automatic inclusion of prototype into your html head with this flag set to true, like:
---
disable_prototype: true