sass-site/config.rb

80 lines
1.8 KiB
Ruby
Raw Normal View History

2013-10-09 12:30:53 +02:00
require "builder"
require 'susy'
2013-02-11 03:39:30 +01:00
# TODO: Make this work
2013-10-09 12:30:53 +02:00
# require "kss"
2013-02-11 03:39:30 +01:00
# require 'typogruby'
# require 'nokogiri'
#use Rack::typogruby
#module Rack
# class Typo
# def initialize(app)
# @app = app
# end
# def call(env)
# status, headers, response = @app.call(env)
# if headers["Content-Type"].include? "text/html"
# s = ""
# response.body.each { |x| s << x}
# doc = Nokogiri::HTML(s)
# doc.encoding = 'UTF-8'
# doc.at_css("body").traverse do |node|
# if node.text?
# node.replace(Nokogiri::HTML.fragment(Typogruby.improve(node.content)))
# end
# end
# response.body = doc.to_html.lines.to_a
# end
# [status, headers, response]
# end
# end
#end
#activate :typogruby
2013-10-09 12:30:53 +02:00
activate :livereload
2012-09-27 12:26:50 +02:00
activate :directory_indexes
2013-10-09 12:30:53 +02:00
activate :automatic_image_sizes
activate :syntax,
:linenos => 'table', # inline or table
:linenostart => 2
2012-09-27 12:26:50 +02:00
2013-10-09 12:30:53 +02:00
set :markdown, :fenced_code_blocks => true,
:autolink => true,
:smartypants => true
set :markdown_engine, :redcarpet
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
2013-10-09 12:30:53 +02:00
compass_config do |config|
config.output_style = :condensed
end
2013-10-09 12:30:53 +02:00
with_layout :layout_2_column do
page "/*", :layout => "layout_2_column"
end
with_layout :styleguide do
page "/styleguide/*"
#@styleguide = Kss::Parser.new('source/css')
end
configure :build do
2012-09-27 12:26:50 +02:00
activate :minify_css
activate :minify_javascript
2013-10-09 12:30:53 +02:00
activate :gzip
activate :cache_buster
activate :asset_hash
2012-09-27 12:26:50 +02:00
activate :favicon_maker
# First: gem install middleman-smusher
# require "middleman-smusher"
# activate :smusher
2013-10-09 12:30:53 +02:00
compass_config do |config|
config.output_style = :compressed
end
end