homepage/config.rb

106 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|
config.output_style = :compact
end
2013-04-05 10:34:37 +00:00
#configure :build do
# ignore "source/images/companies/*.png"
#end
2012-06-22 18:08:09 +00:00
##
# 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
2013-02-03 06:26:35 +00:00
helpers do
2013-09-19 07:01:52 +00:00
def active_nav(url)
" pure-menu-selected" if url == current_page.url
end
2013-02-03 06:26:35 +00:00
end
2012-06-14 16:49:16 +00:00
# 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
#activate :minify_css
2012-06-22 18:08:09 +00:00
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-07-26 18:30:17 +00:00
#activate :relative_assets
2012-06-22 18:08:09 +00:00
2013-01-06 21:39:15 +00:00
activate :cache_buster
2012-06-14 16:49:16 +00:00
# Compress PNGs after build
# First: gem install middleman-smusher
2013-06-05 17:28:49 +00:00
#activate :smusher
2012-06-23 06:30:52 +00:00
activate :gzip
2012-06-22 18:08:09 +00:00
2013-02-20 22:18:23 +00:00
activate :livereload
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