middleman/middleman-cli/lib/middleman-templates/shared/config.tt

85 lines
1.8 KiB
Plaintext
Raw Normal View History

2012-07-16 22:52:06 +02:00
###
2011-07-26 05:48:49 +02:00
# Compass
###
# 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-07-16 22:52:06 +02:00
#
# With no layout
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
2012-07-16 22:52:06 +02:00
#
# With alternative layout
# page "/path/to/file.html", layout: :otherlayout
2011-07-26 05:48:49 +02:00
# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
# proxy "/this-page-has-no-template.html", "/template-file.html", locals: {
# which_fake_page: "Rendering a fake page with a local variable" }
2011-07-26 05:48:49 +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
# Reload the browser automatically whenever files change
2014-03-10 01:50:34 +01:00
# configure :development do
# activate :livereload
# end
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
<% if options[:css_dir] -%>
set :css_dir, '<%= options[:css_dir] -%>'
2011-02-05 19:32:04 +01:00
<% else -%>
# Change the CSS directory
# set :css_dir, "alternative_css_directory"
2011-02-05 19:32:04 +01:00
<% end -%>
<% if options[:js_dir] -%>
set :js_dir, '<%= options[:js_dir] -%>'
2011-02-05 19:32:04 +01:00
<% else -%>
# Change the JS directory
# set :js_dir, "alternative_js_directory"
2011-02-05 19:32:04 +01:00
<% end -%>
<% if options[:images_dir] -%>
set :images_dir, '<%= options[:images_dir] -%>'
2011-02-05 19:32:04 +01:00
<% else -%>
# Change the images directory
# set :images_dir, "alternative_image_directory"
2011-02-05 19:32:04 +01:00
<% end -%>
2009-11-03 01:41:28 +01:00
# Build-specific configuration
configure :build do
# For example, change the Compass output style for deployment
# activate :minify_css
2012-07-16 22:52:06 +02:00
2009-11-03 01:41:28 +01:00
# Minify Javascript on build
# activate :minify_javascript
2012-07-16 22:52:06 +02:00
2009-11-17 20:13:32 +01:00
# Enable cache buster
# activate :asset_hash
2012-07-16 22:52:06 +02:00
# Use relative URLs
# activate :relative_assets
2012-07-16 22:52:06 +02:00
# Or use a different image path
# set :http_prefix, "/Content/images/"
end