Added a layout generator #254

wants to merge 4 commits into

6 participants


This is a Rails generator I wrote that makes it easy to include a Twitter Bootstrap template as a layout file. The templates are copied from the examples and modified to use the Rails asset pipeline.


rails g bootstrap_sass:layout application --template=fluid

From the USAGE file

    Generates a layout based on the Twitter Bootstrap example templates.

    **Note:** The layout doesn't include <%%= yield %>.
    You will need to add that yourself.

    The template choices are
      - starter_template (default)
      - hero
      - fluid

    rails generate bootstrap_sass:layout application --template=fluid

    This will create:

Note: This pull request doesn't include tests. I'm not familiar with TestUnit and I wasn't sure how to write tests for a rails generator.


I like this very much, gives a quick way to start based on the new bootstrap templates. @thomas-mcdonald any comment?


Curious if any additional thought has gone into this. Would love to have this added.


Just curious, what's the reason to skip the <%= yield %>?

Bootstrap member

this project has a set of generators, this is a bit out of scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment