homepage/config.rb

104 lines
1.9 KiB
Ruby
Raw Normal View History

2012-07-21 20:07:21 +00:00
###
2012-06-14 16:49:16 +00:00
# Compass
###
2012-07-21 20:07:21 +00:00
page "/albert/", :layout => false
2012-06-14 16:49:16 +00:00
# Change Compass configuration
2012-06-22 18:08:09 +00:00
compass_config do |config|
require 'ninesixty'
config.output_style = :compact
end
configure :build do
ignore "source/images/companies/*.png"
end
##
# Slim
##
# beautiful html in development
set :slim, :pretty => true
2012-06-14 16:49:16 +00:00
###
# Haml
###
# CodeRay syntax highlighting in Haml
# First: gem install haml-coderay
# require 'haml-coderay'
# CoffeeScript filters in Haml
# First: gem install coffee-filter
# require 'coffee-filter'
# Automatic image dimensions on image_tag helper
# activate :automatic_image_sizes
###
# Page command
###
# Per-page layout changes:
2012-07-21 20:07:21 +00:00
#
2012-06-14 16:49:16 +00:00
# With no layout
# page "/path/to/file.html", :layout => false
2012-07-21 20:07:21 +00:00
#
2012-06-14 16:49:16 +00:00
# With alternative layout
# page "/path/to/file.html", :layout => :otherlayout
2012-07-21 20:07:21 +00:00
#
2012-06-14 16:49:16 +00: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
###
# Helpers
###
# Methods defined in the helpers block are available in templates
# helpers do
# def some_helper
# "Helping"
# end
# end
# Change the CSS directory
# set :css_dir, "alternative_css_directory"
# Change the JS directory
# set :js_dir, "alternative_js_directory"
# Change the images directory
# set :images_dir, "alternative_image_directory"
# Build-specific configuration
configure :build do
# For example, change the Compass output style for deployment
2012-06-22 18:08:09 +00:00
activate :minify_css
2012-06-14 16:49:16 +00:00
# Minify Javascript on build
2012-06-22 18:08:09 +00:00
activate :minify_javascript
2012-06-14 16:49:16 +00:00
# Enable cache buster
2012-06-22 18:08:09 +00:00
activate :cache_buster
2012-06-14 16:49:16 +00:00
# Use relative URLs
2012-06-22 18:08:09 +00:00
activate :relative_assets
2012-06-14 16:49:16 +00:00
# Compress PNGs after build
# First: gem install middleman-smusher
2012-06-23 06:30:52 +00:00
activate :smusher
activate :gzip
2012-06-22 18:08:09 +00:00
2012-06-14 16:49:16 +00:00
# Or use a different image path
# set :http_path, "/Content/images/"
2012-06-22 18:08:09 +00:00
end