2012-08-14 00:39:06 +02:00
|
|
|
###
|
2011-07-26 05:48:49 +02:00
|
|
|
# Compass
|
|
|
|
###
|
|
|
|
|
2011-07-10 22:55:40 +02:00
|
|
|
# Susy grids in Compass
|
|
|
|
# First: gem install compass-susy-plugin
|
|
|
|
# require 'susy'
|
|
|
|
|
2011-07-26 05:48:49 +02:00
|
|
|
# Change Compass configuration
|
|
|
|
# compass_config do |config|
|
|
|
|
# config.output_style = :compact
|
|
|
|
# end
|
|
|
|
|
|
|
|
###
|
2011-12-23 19:55:25 +01:00
|
|
|
# Page options, layouts, aliases and proxies
|
2011-07-26 05:48:49 +02:00
|
|
|
###
|
|
|
|
|
|
|
|
# Per-page layout changes:
|
2012-08-14 00:39:06 +02:00
|
|
|
#
|
2010-09-05 05:26:48 +02:00
|
|
|
# With no layout
|
2014-05-27 02:58:35 +02:00
|
|
|
# page "/path/to/file.html", layout: false
|
2012-08-14 00:39:06 +02:00
|
|
|
#
|
2010-09-05 05:26:48 +02:00
|
|
|
# With alternative layout
|
2014-05-27 02:58:35 +02:00
|
|
|
# page "/path/to/file.html", layout: :otherlayout
|
2011-07-26 05:48:49 +02:00
|
|
|
|
|
|
|
# Proxy (fake) files
|
2014-05-27 02:58:35 +02:00
|
|
|
# page "/this-page-has-no-template.html", proxy: "/template-file.html" do
|
2011-07-26 05:48:49 +02:00
|
|
|
# @which_fake_page = "Rendering a fake page with a variable"
|
|
|
|
# end
|
2009-10-23 02:25:15 +02:00
|
|
|
|
2011-07-26 05:48:49 +02:00
|
|
|
###
|
2009-10-23 02:25:15 +02:00
|
|
|
# Helpers
|
2011-07-26 05:48:49 +02:00
|
|
|
###
|
|
|
|
|
2011-12-23 19:55:25 +01:00
|
|
|
# Automatic image dimensions on image_tag helper
|
|
|
|
# activate :automatic_image_sizes
|
|
|
|
|
2011-07-26 05:48:49 +02:00
|
|
|
# Methods defined in the helpers block are available in templates
|
2011-07-10 22:57:31 +02:00
|
|
|
# helpers do
|
2011-07-26 05:48:49 +02:00
|
|
|
# def some_helper
|
2011-07-10 22:57:31 +02:00
|
|
|
# "Helping"
|
|
|
|
# end
|
|
|
|
# end
|
2009-10-23 02:25:15 +02:00
|
|
|
|
2010-09-05 05:26:48 +02:00
|
|
|
# Change the CSS directory
|
|
|
|
# set :css_dir, "alternative_css_directory"
|
2009-10-23 02:25:15 +02:00
|
|
|
|
2010-09-05 05:26:48 +02:00
|
|
|
# Change the JS directory
|
|
|
|
# set :js_dir, "alternative_js_directory"
|
|
|
|
|
|
|
|
# Change the images directory
|
|
|
|
# set :images_dir, "alternative_image_directory"
|
2009-11-03 01:41:28 +01:00
|
|
|
|
2014-09-11 18:40:10 +02:00
|
|
|
# Production configuration
|
2014-06-07 00:32:00 +02:00
|
|
|
configure :production do
|
2009-10-23 02:25:15 +02:00
|
|
|
# For example, change the Compass output style for deployment
|
2010-09-07 03:48:25 +02:00
|
|
|
# activate :minify_css
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2014-09-11 18:40:10 +02:00
|
|
|
# Minify Javascript
|
2010-09-07 03:48:25 +02:00
|
|
|
# activate :minify_javascript
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2009-11-17 20:13:32 +01:00
|
|
|
# Enable cache buster
|
2010-09-07 03:48:25 +02:00
|
|
|
# activate :cache_buster
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2011-04-19 23:24:21 +02:00
|
|
|
# Use relative URLs
|
|
|
|
# activate :relative_assets
|
2012-08-14 00:39:06 +02:00
|
|
|
|
2009-10-23 02:25:15 +02:00
|
|
|
# Or use a different image path
|
2013-08-16 00:24:03 +02:00
|
|
|
# set :http_prefix, "/Content/images/"
|
2012-08-14 00:39:06 +02:00
|
|
|
end
|