Skip to content

Instantly share code, notes, and snippets.

@vagmi
Created April 22, 2009 10:48
Show Gist options
  • Save vagmi/99714 to your computer and use it in GitHub Desktop.
Save vagmi/99714 to your computer and use it in GitHub Desktop.
$:.unshift File.join(File.dirname(__FILE__),'lib/sinatra/lib')
require 'rubygems'
require 'sinatra'
use_in_file_templates!
get '/:name' do
params['title'] = 'Sinatra and Liquid rocks'
liquid :index, :locals => params
end
__END__
@@layout
<html>
<head><title>{{title}}<title></head>
<body>
{{content}}
</body>
</html>
@@ index
<h1>{{ name }}</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment