A simple rack web layer for delivering rendered static files.
$ gem install flatrack
Creating your Flatrack site
$ flatrack new my-website
You should have 4 directories:
- assets - layouts - pages - partials
Location of sprockets assets, flatrack comes with Sass and Coffeescript out of the box.
Pages are the guts of your site, this is what your users will ultimately see. Basically put your content here.
Layouts are the skin of your site, it's what takes all those guts that your users need and crave and puts them in a nice pretty layout for them to enjoy.
You can also define a custom layout using the following syntax:
<!-- /pages/my-view.html.erb --> <%- use_layout :custom_layout %> <p>Hello World</p>
Running your site
$ flatrack start
How it works
/pages maps to a URL at
/, root of a directory will always map to the
index.html.* file in it.
GET /foo.html would map to
/pages/foo.html.erb, the erb (or any other format) is optional if you wish to render your pages dynamically.
- Ruby Evaluated Output
- HAML (haml-flatrack)
- Markdown (redcarpet, bluecloth)
- Textile (Redcloth)
- and more! (see Tilt for more details.)
Sites using flatrack
Pull Request to add yours!
- Fork it ( http://github.com/jwaldrip/flat-rack/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request