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