Middleman extension to easily generate a Twitter Bootstrap navbar
View the Project on GitHub bootstrap-ruby/middleman-bootstrap-navbar
Middleman extension to easily generate a Twitter Bootstrap navbar
Add this line to your application's Gemfile:
gem 'middleman-bootstrap-navbar'
And then execute:
$ bundle
Or install it yourself as:
$ gem install middleman-bootstrap-navbar
The necessary files from Bootstrap >= 2.0 have to be included separately, they are not part of this gem.
At least the CSS files for the navbar are required, and the JS files for dropdowns and responsive features, if you want to use those in the navbar.
Activate the extensions in config.rb
in your Middleman app:
activate :bootstrap_navbar
This extension needs to know which Bootstrap version you are using, because the navbar HTML looks different in different Bootstrap versions.
If you're using bootstrap-sass, you're all set because the Boostrap version will be sniffed from the bootstrap-sass version.
Otherwise set the Bootstrap version when activating the extension:
activate :bootstrap_navbar do |bootstrap_navbar|
bootstrap_navbar.bootstrap_version = '3.0.3'
end
The gem bootstrap-navbar is used to generate the HTML. Please refer to the gem's README and the following Wiki entries for detailed instructions on how to generate the navbar:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)