#!/usr/bin/env ruby compile '/static/less/*' do if @item.identifier.gsub('/static/less/','').chop == 'bootstrap' then filter :less end end route '/static/less/*/' do path = @item.identifier.chop.gsub('/static/less/', '/static/css/') path + '.css' end compile '*' do if item.binary? else filter :erb filter :redcarpet2, :options => [:smart] filter :source_inserter filter :colorize_syntax, :coderay => { :css => :style} layout 'default' end end route '*' do if @item.binary? # Write item with identifier /foo/ to /foo.ext item.identifier.chop + '.' + item[:extension] else # Write item with identifier /foo/ to /foo/index.html @item.identifier + 'index.html' end end layout '*', :erb