ODC Middleman Boilerplate
A project boilerplate using the Middleman static site generator.
Initiating a new project...
Install Middleman with
gem install middleman
Clone this repository into
~/.middleman/odc-boilerplate-middleman(you'll have to create this directory if it's not already there).
Then you'll be able to use Middleman init with the project template like so:
middleman init my-new-project --template=odc-boilerplate-middleman
To test your site, run
middleman server, and point your web browser to
Middleman will process changes to Sass and CoffeeScript files, and if you're lucky it will even refresh your browser when it detects file changes/deletions.
Building your project
When you're ready to turn your project into a static site, run
This will compile all templates and copy them, along with compiled Sass and CoffeeScript files, over to a
Bourbon is included for CSS vendor prefixing and helpers.
#= require_directory . which will import all files immediately within the
/script directory (but not files within
vendor or additional create folders.)
Include new scripts by adding to the top of
/scripts/site.coffee like so:
#= require vendor/additional-lib includes a file called
additional-lib.js located in
The app can be deployed most easily using Middleman buildpack from Indirect, which automatically builds your middleman site directly on heroku at each deploy. From your app directory:
# When creating a new app... heroku create myapp --buildpack http://github.com/indirect/heroku-buildpack-middleman.git # Or to an existing app... heroku config:add BUILDPACK_URL=http://github.com/indirect/heroku-buildpack-middleman.git # And then deploy the app as usual... git push heroku master