Skip to content

Instantly share code, notes, and snippets.

@kossnocorp
Created January 26, 2010 11:50
Show Gist options
  • Select an option

  • Save kossnocorp/286773 to your computer and use it in GitHub Desktop.

Select an option

Save kossnocorp/286773 to your computer and use it in GitHub Desktop.
set :app_file, __FILE__
set :root, File.dirname(__FILE__)
set :views, 'views'
set :public, 'public'
configure do
Compass.configuration.parse \
File.join(Sinatra::Application.root, 'config', 'compass.rb')
end
before do
$host = request.env['HTTP_HOST']
end
get '/stylesheets/:name.css' do
content_type 'text/css', :charset => 'utf-8'
sass :"stylesheets/#{params[:name]}", Compass.sass_engine_options
end
get '/' do
haml :index
end
get '/:page' do
haml params[:page].to_sym
end
get '/post/:post_name' do
# haml
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment