Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Rack application for serving static sites
tag: v0.3.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
LICENSE
README.md
Rakefile
brochure.gemspec
config.ru.example

README.md

Brochure

A Rack application for serving static sites with ERB templates.

Sample application structure:

templates/
  help/
    index.html.erb
  index.html.erb
  shared/
    _header.html.erb
    _footer.html.erb
  signup.html.erb
config.ru
public/
  ...

Sample config.ru:

require "brochure"
run Brochure.app(File.dirname(__FILE__))

URLs are automatically mapped to template names. So / will render templates/index.html.erb, /signup will render templates/signup.html.erb, /help/ will render templates/help/index.html.erb, and so on.

Templates can render partials. Partials are denoted by a leading underscore in their filename. So <%= render "shared/header" %> will render templates/shared/_header.html.erb inline.

Installation

$ gem install brochure

Requires Hike, Rack, and Tilt.

License

Copyright (c) 2010 Sam Stephenson and Josh Peek.

Released under the MIT license. See LICENSE for details.

Something went wrong with that request. Please try again.